php - Assigning multiple classes to a tag using PHPTAL -


I have an array of data, which I want to use as an outlet for PHP simple), first and last A class attribute for element (easy) ... at the same time (hard).

Let me combine:

  & lt; Ul tal: repeat = "item items" & gt; & Lt; Li class = "$ {item / class}" & gt; $ {Item / text} & lt; / Li & gt; & Lt; / Ul & gt;  

with this

  & lt; Ul rhythm: repeat = "item item" & gt; & Lt; Li rhythm: property = "square repeat / item / first 'first'" & gt; $ {Item / text} & lt; / Li & gt; & Lt; / Ul & gt;  

and this

  & lt; Ul rhythm: repeat = "item item" & gt; & Lt; Li tal: attributes = "class repeat / item / last" "& gt; $ {Item / text} & lt; / Li & gt; & Lt; / Ul & gt;  

This is purely current content, so I want to pure it in PHPTAL. Is this possible?

No, there are no net bids for this.

  & lt; Li tal: attributes = "class php: repeat.item.last? 'Last': (repeat.item.first? 'First': NULL)" & gt;  

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -