Re: [SMARTY] Re: How can I use constants defined in php
| From: | Monte Ohrt | Date: | Wed, 18 Feb 2004 14:33:52 +0000 |
| Subject: | Re: [SMARTY] Re: How can I use constants defined in php | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10979@lists.php.net to get a copy of this message | ||
On Wed, 2004-02-18 at 08:19, pete M wrote:
> define("CON","value");
> $smarty->assign("CON","CON");
You mean:
$smarty->assign("CON",CON);
You can also access constants directly:
{$smarty.const.CON}
>
> in the template
> <b>{$CON}</b>
>
>
> Myhan wrote:
>
> > I have defined many constants in my php models, and I use Smarty to
> > implement my views. How can I use these constants direct. I cannot find
> > anything about it in Smarty manual.
> >
> > Thanks~~~~