.tpl.php template files, I have several links and names of external websites. I would like to print these as variables, which are defined in
template.php. That way, if I have to change a link, I can just change it in
template.php and have them updated in all my
How can I do this?
Steps I have tried
In this tutorial, it says you can define your variables in
themename_preprocess_page(&$variables). You can then call them with
<?php print render($page['your_variable_name']); ?>
However, when I try this, I just get a message stating
Notice: Undefined variable: page in include(). The variable also doesn't print.
Also, if I use this method, can I use my variable in all tpl.php files or just the page.tpl.php file?