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

Code between sections

 
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 -> Feature Requests
View previous topic :: View next topic  
Author Message
edwin
Smarty n00b


Joined: 22 Jul 2003
Posts: 2

PostPosted: Tue Jul 22, 2003 12:41 pm    Post subject: Code between sections Reply with quote

Assume you have an array ( "aap", "noot", "mies" ), and you want it to display as:

aap
<hr>
noot
<hr>
mies

So certain code must only be placed between the sections. That's not easy to do right now.

I suggest a {between}-tag which can hold the code between the sections, like:

Code:

{section name=i loop=$ar}
    $ar[i]
    {between}
    <hr>
    {/between}
{/section}
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue Jul 22, 2003 12:59 pm    Post subject: Re: Code between sections Reply with quote

what about
Code:

{section name=i loop=$ar}
    $ar[i]
{if !smarty.section.i.last}<hr>{/if}
{/section}

?

( http://smarty.php.net/manual/en/section.property.last.php )
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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 -> Feature Requests 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