Re: [SMARTY] Special variables in function calls
| From: | Сергей Глазырин | Date: | Fri, 24 Feb 2006 12:28:26 +0000 |
| Subject: | Re: [SMARTY] Special variables in function calls | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13332@lists.php.net to get a copy of this message | ||
{my_function arg1="{$smarty.get.my_var}" arg2="val2"} - this is true variant of
used GLOBAL variables in your template function.
-----Original Message-----
From: Dep <dep@ztu.edu.ua>
To: smarty-general@lists.php.net
Date: Thu, 23 Feb 2006 11:55:53 +0200
Subject: [SMARTY] Special variables in function calls
> I have a plugin function which produces some output.
> In template it's called in a following way:
>
> {my_function arg1="val1" arg2="val2"}
>
> Is there any way to insert a value of, for example $smarty.get.my_var
> for one of the arguments???
> Lines below cause compiler error.
>
> {my_function arg1="$smarty.get.my_var" arg2="val2"}
> {my_function arg1="{$smarty.get.my_var}" arg2="val2"}
>
> PS: I know that using directly request vars in templates is not a good
> practice, but this is just an example
>
> Dmitriy
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>