Re: [SMARTY] Unofficial new feature patch for Smarty 2.1.1

From: Date: Mon, 20 May 2002 23:00:54 +0000
Subject: Re: [SMARTY] Unofficial new feature patch for Smarty 2.1.1
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4317@lists.php.net to get a copy of this message
Stealth Dave wrote:
The patch is for a real for loop which assigns the counter in a variable which can be used by other functions. Currently, the only way to create a loop in smarty is by using either section or foreach, both of which require an existing array. The new forloop function has no such requirement. I needed it to create a page counter, but it is certainly useful for many other functions as well.
section does not require an existing array. btw, although {section} can do arbitrary loops and do your counter needs, a much simpler solution is to use the {counter} function that comes with Smarty. -- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

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