I’m building a site using separate snippets for both the header and footer, I need to show the phone number in both the header and footer and throughout the home page and on the contact page.
At the moment I have stored the phone number as a field on the home page content txt file (telephone) so the user can update this in the home blueprint.
I have it placed a few times through the home page using:
<?php
$home = page('home');
?>
<?= $home->telephone() ?>
But the problem is this doesn’t work in the header and footer snippets and says $home is undefined?
What is the best way/place to store this and show it multiple times throughout the site?
Thanks.