This seemingly simple task proved more difficult than I imagined.. I’m trying to get a variable from themename_preprocess_html to my html.tpl.php.
The code I have in my template.php file:
<?php function themename_preprocess_html(&$variables) { $variables['test'] = "Hello world!"; }
And in my html.tpl.php file I have:
<?php print($test); ?>
Unfortunately, the variable isn’t displayed in the page. It says:
Notice: Undefined variable: test in include()
I’m trying to do this so I can use node fields to determine variables in my stylesheet.
Is there any way I can print all available variables in my html.tpl.php?