Re: [SMARTY] Passing a smarty variable to a template function possible?

From: Date: Thu, 27 Mar 2003 23:27:25 +0000
Subject: Re: [SMARTY] Passing a smarty variable to a template function possible?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8967@lists.php.net to get a copy of this message
On Fri, Mar 28, 2003 at 12:47:44AM +0200, gawan wrote: > I wrote a custom template function but I need to pass it a > variable that is also a smarty variable. Is this possible. > > My function does not raise any errors but it shows nothin g either. > Would this be because it is not possible to use smarty variables > as parameters to a smarty function? by "smarty variable" you mean something like $smarty.get.foo ? it. should be no problem to pass them to you function. to debug such behaviour, you can try to: - do {$smarty.yourvar} before the call to your function to see if it has contents anyway. - add "print_r($params);" add the top of you function, to see what gets passed - have a look at the compiled template in templates_c. it is not that complicated to read as it may look at first sight. search for the call to your custom-function and see whats gets passed from that end. greetings messju > thanks

« previous php.smarty.general (#8967) next »