4

This displays nothing:

$Articles:{ $if(i!=1)$ display in between articles $endif$ $it.Text
}

This displays as expected

$Articles:{ display in between articles $it.Text
}

Any ideas on how to get this working?

2 Answers2

7

you need to compute all expressions and push into the template. You are clearly filtering, which shoul be done in the model not the view. Please see:

http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf

Terence

Terence Parr
  • 136
  • 1
0

here, it says that $if tests for the presence of an attribute or evaluates a boolean expr. The only operator allowed is !(NOT),
so maybe you can define a boolean variable = (i!=1) and use it in the $if statement.

manji
  • 47,442
  • 5
  • 96
  • 103
  • yeah I saw that, don't know how I can create a boolean value within a loop as a global one would be no use to me. The i value represents the current iteration. –  Oct 15 '09 at 14:31