Hello All,
I had defined a variable in config.php file, how can i get the value of that variable in theme/demor/templates/album.php file.
Regards, Pankaj Kumar
album.php? sounds like g1 and not like g2.
Sorry it is album.tpl file not album.php file. Here i am asking about g2.
Supposing you put this in your config.php:
$foo = "bar";
In themes/<yourtheme>/theme.inc edit the showAlbumPage() function and add this:
$theme =& $template->getVariableByReference('theme'); global $foo; $theme['foo'] = $foo;
That passes the value to the template. Then in the template you can do this:
{$theme.foo}
to get your value.
Posts: 32509
album.php? sounds like g1 and not like g2.
Posts: 3
Sorry it is album.tpl file not album.php file.
Here i am asking about g2.
Posts: 7985
Supposing you put this in your config.php:
In themes/<yourtheme>/theme.inc edit the showAlbumPage() function and add this:
$theme =& $template->getVariableByReference('theme'); global $foo; $theme['foo'] = $foo;That passes the value to the template. Then in the template you can do this:
{$theme.foo}to get your value.