Re: [SMARTY] Finding first and last section loop var
| From: | Ben Godfrey | Date: | Mon, 01 Jul 2002 20:44:53 +0000 |
| Subject: | Re: [SMARTY] Finding first and last section loop var | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5142@lists.php.net to get a copy of this message | ||
Check out the $smarty special variable.
The features you are looking for are documented in these pages of the manual:
http://www.phpinsider.com/php/code/Smarty/docs/x1044.html
http://www.phpinsider.com/php/code/Smarty/docs/x1050.html
Monte:
I found the documentation of the $smarty variable a bit tricksy as well. How about instead of linking to the section, foreach and capture sections the language.variables.smarty.* pages quickly list the features (like first and last) and link to those pages as well?
Ben
On Monday, July 1, 2002, at 09:35 , Sean Chambers wrote:
This is what I am trying to do. Fairly simple actually: {section name=page loop=$pages} print some stuff here {/section} All I want to do is insert a certain graphic before the print statement if it is the first loop. The reason for this is because I am displaying graphics with this loop. If it is the first graphic displayed, a graphic needs to be displayed before it. Also I need to know which loop is the final loop so I can again print a special graphic. Thanks for your help. Sean Chambers Web Developer Vann Data Technology Centre Daytona Beach, FL (386) 238-1200 ext. 1205 chamberss@vanndata.com