Created
November 30, 2012 02:01
-
-
Save makbeta/4173302 to your computer and use it in GitHub Desktop.
Luminate CMS: Assign classes .first & .last to first & last items in the list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<t:if test="length > 0"> | |
<ul><t:list> | |
<t:set id="myClass" value="''" /> | |
<t:if test="index == 1"><t:set id="myClass" value="'first'" /></t:if> | |
<t:if test="index == length"><t:set id="myClass" value="concat(myClass, ' last')" /></t:if> | |
<t:set id="myClass" value="trim(myClass)" /> | |
<t:if test="!isNull(myClass)"><li class="${myClass}"></t:if> | |
<t:else><li></t:else> | |
<a href="${url}">${title}</a><p>${description}</p> | |
</li> | |
</t:list></ul> | |
</t:if> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment