Re: [SMARTY] again.. $global_assign
| From: | Andrei Zmievski | Date: | Tue, 04 Jun 2002 18:00:37 +0000 |
| Subject: | Re: [SMARTY] again.. $global_assign | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4580@lists.php.net to get a copy of this message | ||
On Tue, 04 Jun 2002, Blue Presley wrote:
> I'm glad that my questions and comments have aroused positive discussion about aspects of
> smarty.. HOWEVER.. could someone PLEASE answer my question?
>
>
> $global_assign.. what is it? what does it do? how does it work? could someone give an example?
>
>
> Is $global_assign used to pass assigned template values from one page to another? if so, how do
> i access it? right now i'm having to reassign my variables on each page and it's a pain
> in the ass.
It is very simple. There are some global variables which are very handy
in every template, like $SCRIPT_NAME, for example. So, to avoid
assigning it each time by hand, you put an entry into $global_assign
array and Smarty will assign it for you.
Surely you can read the docs?
http://smarty.php.net/manual/en/variable.global.assign.html
-Andrei http://www.gravitonic.com/
Any sufficiently advanced bug is
indistinguishable from a feature.
-- Rich Kulawiec