Bug in index_prev feature

From: Date: Mon, 14 May 2001 12:28:46 +0000
Subject: Bug in index_prev feature
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-756@lists.php.net to get a copy of this message
Hi, I can't get the index_prev feature to work anymore. To test it with the simplest scenario possible, I modified the index.tpl file that comes with Smarty a bit: My interests are: {section name=outer loop=$FirstName} {if %outer.index% is odd by 2} {%outer.rownum%} . {$FirstName[outer]} {$LastName[outer]} {else} {%outer.rownum%} * {$FirstName[outer]} {$LastName[outer]} {/if} Previous: {$FirstName[outer.index_prev]} {sectionelse} none {/section} But nothing is displayed after Previous. I looked at the compiled code, and it appears that {$FirstName[outer.index_prev]} is compiled as: Previous: <?php echo $this->_tpl_vars['FirstName']['index_prev']; ?> This is wrong. This should be: Previous: <?php echo $this->_tpl_vars['FirstName'][$_smarty_sections["outer"]['properties']['index_prev']]; ?> Unfortunately I'm not a regular expression guru, so I wasn't able to fix it. Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl

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