Re: [SMARTY] Creating custom loop block function

From: Date: Sat, 24 Dec 2005 00:06:56 +0000
Subject: Re: [SMARTY] Creating custom loop block function
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13202@lists.php.net to get a copy of this message
--- Kaloyan Tsvetkov <kaloyan@gmail.com> wrote: > I did that. But then all my rows are populated with the values of the last > row. For example, the calls from the compiled version to <?php echo > $this->_tpl_vars['SKU']; ?> always return the {SKU} from the last row. It > seems to me all the loop iterations are done before accessing the first > {cell} block. > > It seems that I am doing something wrong, but I can not figure it out. Hi. I'm not sure this will be helpful, but I have been following this thread and I can't help but be reminded of my own experiences trying to fully grok implementing more exotic looping functionalities in Smarty. To that end I wanted a concrete example of a relatively complex interaction; not finding any, I built one. The result (though imperfect) is at the wiki with a discussion thread at the forums. I think it has some overlap with what you are doing so perhaps it will serve to give you an idea that you can build on. Code at the Wiki: http://smarty.incutio.com/?page=BandedReportGenerator Discussion at the Forum: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=4125 Greetings, xo boots __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com

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