Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Specific place in loop

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
DBFT
Smarty n00b


Joined: 18 Jan 2007
Posts: 2

PostPosted: Sun Jan 21, 2007 9:51 am    Post subject: Specific place in loop Reply with quote

I currently loop over all results like this:

{section name=mysec loop=$leadership}
// all the code for layout here... using things such as {$leadership[mysec].bio}
{/section}

However, I want to be able to pass a $start variable, which will be the place the loop will start, it should then loop 3 times(at most - if there is not a further 3 in the array it should just stop)

is this possible with smarty?
Back to top
View user's profile Send private message
Pap
Smarty Regular


Joined: 21 Jun 2006
Posts: 69
Location: Denver, CO

PostPosted: Sun Jan 21, 2007 5:37 pm    Post subject: Reply with quote

You could read the manual on section loops, to start with:
http://smarty.php.net/manual/en/language.function.section.php
_________________
Don't be stupid, be a Smarty™.
Come and join the P-H-Party.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP