Skip to content

Instantly share code, notes, and snippets.

@makbeta
Created November 30, 2012 02:06
Show Gist options
  • Save makbeta/4173320 to your computer and use it in GitHub Desktop.
Save makbeta/4173320 to your computer and use it in GitHub Desktop.
Luminate CMS: A list that chooses one random item and displays the description field of the item.
<t:if test="length > 0">
<t:set id="randomOne" value="random(length)+1" />
<t:list>
<t:if test="index == randomOne">
<div class="blue">
<h4 class="fact">Did You Know...</h4>
<div class="content">${description}</div>
</div>
</t:if>
</t:list>
</t:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment