Re: [SMARTY] Special variables in function calls

"messju mohr" <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <20060223100847.GA11701@dune>
On Thu, Feb 23, 2006 at 11:55:53AM +0200, Dep wrote:
> 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"}

{my_function arg1=$smarty.get.my_var arg2="val2"}
should work fine

for more examples see:
http://smarty.php.net/manual/en/language.syntax.quotes.php

> 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

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.