Problem with Include File parameters inside Sections.

From: Date: Mon, 05 Jan 2004 16:55:20 +0000
Subject: Problem with Include File parameters inside Sections.
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10773@lists.php.net to get a copy of this message
I need to include a generic template with a varying URL as an argument inside a section loop. {section name=item loop=$mylist} <td> {if $mylist[item].bin == 'yes'}
     {include file = "/deleteIcon.tpl"
             delUrl = "/deleteMe.php?itemType=$mylist[item].type&itemClass=$mylist[item].class"}
{else}
     {include file = "/deleteIcon.tpl" delUrl="javascript:alert('This may not be deleted')"}
{/if} </td> {/section} The version above causes "$mylist[item].type" to become "Array.type" in the URL generated. The delete icon is generic across the whole site and needs the URL generated for it, and I have tried using the dot notation ($mylist.item.type) and to try to get PHP to understans it as one variable (${mylist[item].type}) etc.. So I am obviously going about it all wrong :) Can anyone help me to get this to work? Thanks

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