@texnixe Thanks that was useful.
I have now solved this whole problem, after 3 days of swearing
Now i’m cleaning it up a bit, i want to move all my raw PHP to snippet so that i can use it on multiple templates without duplication. How do i do this so that the variables are accessable to the template that i place the snippet in?
From the docks It looks like the
true parameter is what I want but it had no effect:
<?php snippet('site-caldata', null, true); ?>
The rest of the page cannot see the variables set in that snippet. Is it possible to do this? Should i use a standard PHP require instead?