I’m new to Kirby and playing around with the trail to proof if the concept fit my needs and if I can handle Kirby with my limited programming skills.
What I want to achieve?
I want to build a tiny (5 page) dentist’s site. How I can realise page-wide contents? I want to have e.g. emergency opening hours on every page, but the client should change the content at one particular place.
That’s no problem, let’s suppose your page is on the first level in /content, i.e. /content/opening-hours, then you can reference the page like this from anywhere:
If you don’t want to create a separate page, you could put this content into a field openingHours in your site.txt. You can then reference your content like this:
I add a new page and this page is invisible (pages: true). The client can change the contents very comfortable via Panel and then I include in the (page or default) template the contents. Right?
You can additionally use a separate snippet that gets the data from the page and outputs the right markup.
Simply put the template code in site/snippets/openinghours.php and then include the snippet with <?php snippet('openinghours') ?> in all templates that need to display the snippet.
The description (“Montag”) is specific to the Panel and can’t be accessed from the templates (the core is completely independent from the Panel and doesn’t care about blueprints).