insert: problem with a variable name attribute

From: Date: Thu, 08 Aug 2002 15:59:23 +0000
Subject: insert: problem with a variable name attribute
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5621@lists.php.net to get a copy of this message
Hello, i try the following smarty code in a template (tool.tpl) ... {foreach key=name item=plugin from=$view.main} plugin name: {$name}<br> {insert name=$name view=$plugin.view style=$plugin.style} {/foreach} ...and become an error: Parse error: parse error, unexpected T_STRING, expecting ')' in d:\... \templates_c\%%-62\%%-622499225\tool.tpl.php on line 4 --- Line 3-4 in the compliled template --------------------------- <?php $this->_load_plugins(array( array('insert', '$this->_tpl_vars['name']', 'tool.tpl', 18, false), ... ------------------------------------------------------------------- The assigned array $view looks like that: $view ['main'] ['tool'] ['view'] = 'index'; $view ['main'] ['tool'] ['style'] = 'main'; {insert name=tool view=$plugin.view style=$plugin.style} works fine. Is this a Bug or a missed Feature? Possible Workaround? Regards, Thomas. -- Dipl. Ing. Thomas Schulz - http://4bconsult.de

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