Re: Templating wart

2009-10-09 Thread Chris Withers
british.assassin wrote: > You could do this: > > > {% for cell in row %} > > {% if forloop.first and row.url %}{{cell}} > {% else %} > {{cell}} > {% endif %} Then you're violating DRY on {{cell}}, which of course may be a lot mroe complicated than {{cell}}... cheers, Chris -- Simplistix -

Re: Templating wart

2009-10-09 Thread british.assassin
You could do this: {% for cell in row %} {% if forloop.first and row.url %}{{cell}} {% else %} {{cell}} {% endif %} {% endfor %} On Oct 9, 10:06 am, Chris Withers wrote: > Hi All, > > I have a piece of template that looks like this: > > >   > >    {% for cell in row %} > >     > >    {% if

Templating wart

2009-10-09 Thread Chris Withers
Hi All, I have a piece of template that looks like this: > >{% for cell in row %} > >{% if forloop.first and row.url %}{% endif %} >{{cell}} >{% if forloop.first and row.url %}{% endif %} > >{% endfor %} > How can I structure this such that I don't have to repea