Re: [SMARTY] Re: $smarty variable in a plugin/template

From: Date: Fri, 11 Oct 2002 14:43:18 +0000
Subject: Re: [SMARTY] Re: $smarty variable in a plugin/template
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6119@lists.php.net to get a copy of this message
Hello André, on both you replys.. haven't tried them before I also figured out a way around that is better. and that's instead of using the xtra variable to hold all my data, is just to send the data seperately. so doing: {moddropper modname='topx.php' isoid=$smarty.get.man table=products isow=manufacturers_id num=15 look=products_date_added way=ASC} works fine and is a little cleaner as well. but thanks for both tips. I was wondering about how to assign a variable inside a template as well :) Friday, October 11, 2002, 2:54:19 AM, you wrote: AR> Perhaps this is a workaround for you but I havent tested it yet: AR> {assign var="_man" value=$smarty.get.man} AR> {moddropper modname='topx.php' AR> xtra='table=products:isow=manufacturers_id:isoid=$_man:num=15:look=products_ AR> date_added:way=ASC'} AR> It seems like smarty neither likes string concatening nor using $x.y.z vars AR> within a string. In my projects I therefor your the above workaround. The AR> trick is that you use a simple var ($_man) instead of a multidimensional one AR> ($smarty.get.man) to make it work. AR> Have fun, AR> André AR> "Guido" <sguido@rogers.com> schrieb im Newsbeitrag AR> news:4441304462.20021010005413@rogers.com... >> I'm new at smarty and I've search for this answer but I can't see to >> get this to work.. >> >> I have a variable coming via url that is: man=2 >> >> I've created a plugin module that I use to drop modules on a page and >> I call it from the template page like this: >> >> {moddropper modname='topx.php' >> AR> xtra='table=products:isow=manufacturers_id:isoid=1:num=15:look=products_date AR> _added:way=ASC'} >> >> this works correctly in showing the data.. >> >> Now the problem occurs when I want to make the isoid=1 value dynamic >> and use the "man" value from the url .. I can use: {$smarty.get.man} >> anywhere on the page and it shows correctly as 2.. But I can't seem to >> get it to show 2 in the above system.. >> >> I've tried: >> {moddropper modname='topx.php' >> AR> xtra='table=products:isow=manufacturers_id:isoid={$smarty.get.man}:num=15:lo AR> ok=products_date_added:way=ASC'} >> >> and >> >> {moddropper modname='topx.php' >> AR> xtra='table=products:isow=manufacturers_id:isoid=$smarty.get.man:num=15:look AR> =products_date_added:way=ASC'} >> >> and >> >> {moddropper modname='topx.php' >> AR> xtra='table=products:isow=manufacturers_id:isoid=#$smarty.get.man#:num=15:lo AR> ok=products_date_added:way=ASC'} >> >> >> and nothing has worked ... is it possible to call the $smarty value in the >> plugin call, or am I missing something easy? >> >> -- >> Best regards, >> guido mailto:sguido@rogers.com >> -- Best regards, guido mailto:sguido@rogers.com

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