2013-08-10, 06:50 PM
I want to add some code directly below the "{$header}" line, for every time it appears in every template, and given the fact that that code will probably need to be updated from time to time, I thought it would be a good idea to create a template/variable with that code.
I added a new template with the name "example" (and inserted my custom code there) and now I can see it in the "Ungrouped Templates" section, but when I add "{$example}" below the "{$header}" line, my custom code doesn't appear on my webpage. Do I have to declare the "$example" variable anywhere else in order for it to work?
Nevermind... I fixed it!
I just had to add this line inside the "global.php" file:
I added a new template with the name "example" (and inserted my custom code there) and now I can see it in the "Ungrouped Templates" section, but when I add "{$example}" below the "{$header}" line, my custom code doesn't appear on my webpage. Do I have to declare the "$example" variable anywhere else in order for it to work?
Nevermind... I fixed it!
I just had to add this line inside the "global.php" file:
eval("\$example= \"".$templates->get("example")."\";");