Template Problem

From: Date: Mon, 12 Jan 2004 15:56:19 +0000
Subject: Template Problem
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10811@lists.php.net to get a copy of this message
Why doesn't this work? The following function is called in my catalog script: function returnGallery() { $this->db->select("d_gallerie, d_gallerietxt", "produktkuerzel", "(d_produktname = '".$this->productName."')", "","","",""); $row = $this->db->fetch_array(); $bilder['pic'] = explode("**", $row['d_gallerie']); $bilder['txt'] = explode("**", $row['d_gallerietxt']); if ($bilder['pic'][0] != NULL) return $bilder; } The relevant part of the template looks like this: <div id="col3"> <!-- Gallery: Start--> {if $bilder !=""} {section name=i loop=$bilder} <a href="../images/shop/products/{$bilder.pic.[$smarty.section.i.index]}" target="_blank"> <img src="../images/shop/products/{$bilder.txt.[$smarty.section.i.index]}" alt="" /></a><br /> {/section} {/if} <!-- Gallery: End--> </div> The error message is: Fatal error: Smarty: [in catalog.tpl line 44]: syntax error: unrecognized tag: $bilder.pic.[$smarty.section.i.index] (Smarty_Compiler.class.php, line 380) in D:\dent\classes\design\libs\Smarty_Compiler.class.php on line 1820 Would anybody know where the problem lies ? Thank you very much.

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