Re: [SMARTY] Using PHP global var in template

From: Date: Thu, 20 Jan 2005 16:17:41 +0000
Subject: Re: [SMARTY] Using PHP global var in template
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12178@lists.php.net to get a copy of this message
You don't have direct access to globals. If you want it, then assign it manually: $smarty->assign('globals',$_GLOBALS); {$globals.myglobal} Stephen J. Lawrence Jr. wrote:
What is the syntax for accessing a PHP global var inside a tpl file? I have some global values defined for my php app that I want to have access to in my templates without having to do $smarty->assign('theglobal',$GLOBALS['myglobal']); I searched all over but could not seem to find the answer. steve


« previous php.smarty.general (#12178) next »