Skip to content

Instantly share code, notes, and snippets.

@makbeta
Created November 30, 2012 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makbeta/4173307 to your computer and use it in GitHub Desktop.
Save makbeta/4173307 to your computer and use it in GitHub Desktop.
Luminate CMS: How to make a striped list or table?
<style>
div.odd { background: #eee; }
div.even { background: #fff; }
</style>
<div class="striped">
<t:list>
<t:if test="index%2 == 1"><div class="odd"></t:if>
<t:else><div class="even"></t:else>
${title}
</div>
</t:list>
</div>
<style>
table.striped { border-collapse: collapse; border: 1px solid #ddd;}
table.striped tr.odd { background: #eee; }
table.striped tr.even { background: #fff; }
table.striped td { border: 1px solid #ddd; padding: 5px; }
</style>
<table class="striped"><tbody>
<t:list>
<t:if test="index%2 == 1"><tr class="odd"></t:if>
<t:else><tr class="even"></t:else>
<td>${title}</td>
<td>${description}</td>
</tr>
</t:list> </tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment