MyBB Community Forums

Full Version: Call variable in the header template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Smile
I have a question... I try to add a variable to global.php file and call it to the header template, but the variable is not displayed ...
This is an example :

Global.php
...
$variabletest="hello";
...

Header template
...
{$variabletest}
...

What's wrong?
Thank for the replys Smile
Try to add this variable before:

eval("\$header = \"".$templates->get("header")."\";");

I assume you added this at the end.
Thanks, now work Big Grin

I try to add in the header_welcomeblock_member template, but if I use this code :
eval("\$header_welcomeblock_member = \"".$templates->get("header_welcomeblock_member")."\";"); 

Isn't show ... you have any ideas ? Big Grin
Show us more code.