Re: [SMARTY] global constants define ?
| From: | Matt Warden | Date: | Sun, 03 Apr 2005 19:15:33 +0000 |
| Subject: | Re: [SMARTY] global constants define ? | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12391@lists.php.net to get a copy of this message | ||
You would be better off using config_load. That's what it's for and
you can also specify the scope of the variables. See:
http://smarty.php.net/manual/en/language.function.config.load.php
On Apr 3, 2005 5:23 AM, D_C <d3ntaku@gmail.com> wrote:
> hiya -
>
> I am doing some smarty-ing, and want to define a few constants which
> are used by many templates. however using two files like this;
>
> -- member.tpl:
> {include file="const.tpl}
> ... then do some stuff : but the constants/variables are NOT defined!
>
> -- const.tpl:
> {assign var="textCol" value="#FF0000" }
>
> the "textCol" is only seems to be valid within const.tpl, or any
> "child" files that it includes. so, without copying the definitions to
> the start of every master page, is there a better way?
--
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.