Array variable in a Plugin
| From: | Marcel Güttler | Date: | Tue, 23 Jul 2002 08:51:32 +0000 |
| Subject: | Array variable in a Plugin | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5386@lists.php.net to get a copy of this message | ||
Hi,
I have a problem with "section". I want to set a var from an array to a
plugin-function.
(1) works with $smarty->assign("portal_number","555"); i get
"num=555" for
all data in the section
but in case (2) i get "num=.portalid", not the id from the array
$portaldata[plist].portalid i think smarty parsed only the first part
($portaldata[plist]) not $portaldata[plist].portalid
(GEN_ACTIONID is a Plugin an works)
{section name=plist loop=$portaldata}
<tr>
<td height="24">{$portaldata[plist].name}</td> // it works
(1) <td height="24"><a href="...?{GEN_ACTIONID
querystring="num=$portal_number"}">zum Portal</a></td> // it works
(2) <td height="24"><a href="...?{GEN_ACTIONID
querystring="num=$portaldata[plist].portalid"}">zum Portal</a></td> //
doesn't work
</tr>
{/section}
Marcel Güttler