I am trying to apply a different style to the first element in a list.
I am currently attempting to use a counter to apply the li with a class only when cnt==0 but I cannot include < > brackets in an OutputText tag. Is there any way to escape the brackets or insert the class into an <li> tag using a condition?
I know this could be done after the fact using JavaScript but I'd rather avoid it.
<apex:variable var="cnt" value="{!0}" />
<apex:repeat value="{!items}" var="item" >
<!-- only render the class if it is the first element -->
<apex:OutputText value="<li class="activeLI">" rendered="{!cnt==0}" />
<apex:OutputText value="<li>" rendered="{!cnt!=0}" />
<img src="{!$Resource[item.Image__c]}" width="85" height="90"/>
</li>
<apex:variable var="cnt" value="{!cnt+1}"/>
</apex:repeat>