Re: [SMARTY] constants and config
| From: | messju mohr | Date: | Sun, 09 Mar 2003 16:57:20 +0000 |
| Subject: | Re: [SMARTY] constants and config | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8506@lists.php.net to get a copy of this message | ||
On Sun, Mar 09, 2003 at 03:16:31PM -0000, Alfred Tuinman wrote:
> I am converting FastTemplates to Smarty...
>
> I have a dynamic menu so I cannot put the constants in the template itself.
>
> So how do I load a constant into the template and get it to be converted
> by its value in the config files.
>
> If I do $smarty->assign('test','#TEST#'); it prints just #TEST#
>
> I'm sure there must be an easy way I have overlooked but...
>
> any ideas?
you mean a php-constant? then:
{assign var=tmp value=#TEST#}
{$smarty.const.$tmp}
> Alfred