I'm able to get my php to display in pages by following the steps Boothby described here but can't figure out how to achieve a similar thing for templates.
My knowledge of PHP is practically nothing, but from what I can gather the "callback" you create for pages basically tells the page to look for a specific php file, so you can use it's variables. With a template, there doesn't seem to be call back functionality so I assume you somehow need to pre-register your variable(s).
Is anyone able to give a really basic guide on how to use custom variables in templates? Hopefully, I'll then be able to follow the steps and modify it to suit my needs.