Re: Template - Deleting last character in loop

2009-03-26 Thread Tim Chase
Kless wrote: > I'm building a dinamic list of links, and I want that been separated > by '|' character. > > Note that 'foo' is a list > --- > {% for i in foo %} > {{ i }}| > {% endfor %} > --- > The problem is that I wantn't that last separator (because there isn't >

Re: Template - Deleting last character in loop

2009-03-26 Thread Briel
You can add an if statement and check if {{ foo|lenght }} and {{ forloop.counter }} matches to find out when you have reached the end of the loop. ~Jakob On 26 Mar., 14:46, Kless wrote: > I'm building a dinamic list of links, and I want that been separated > by '|' character. > > Note that 'f

Re: Template - Deleting last character in loop [Solved]

2009-03-26 Thread Kless
I just to solve it :) --- {% ifnotequal i foo|last %}|{% endifnotequal %} --- On 26 mar, 13:46, Kless wrote: > I'm building a dinamic list of links, and I want that been separated > by '|' character. > > Note that 'foo' is a list > --- > {% for i in foo %} >         {

Template - Deleting last character in loop

2009-03-26 Thread Kless
I'm building a dinamic list of links, and I want that been separated by '|' character. Note that 'foo' is a list --- {% for i in foo %} {{ i }}| {% endfor %} --- The problem is that I wantn't that last separator (because there isn't another field). I tried the nex