Classee, an ExpressionEngine add-on by Studio625

Classee

  • Add-on Type: Plugins
  • Version: 1.0
  • Release Date: July 17, 2006
  • Download Classee 1.0
  • PLEASE NOTE: For some reason, about half of purchasers are not able to download the product after finishing the purchase. If that happens to you, contact immediately.

Classee is a simple little plugin that adds “first”, “last”, “odd”, and “even” classes to a list of items.

Wrap the items you want “classed” in {classee:item}{/classee:item} tags. Then use these variables:

  • {classee:class_full} - Output looks like: class="first odd”
  • {classee:class_short} - Output looks like: first odd
  • {classee:item_count} - The current item number

Example:

{exp:classee}
{exp:weblog:entries limit="5"}
{classee:item}
<div{classee:class_full}>{title}</div>
{/classee:item}
{/exp:weblog:entries}
{/exp:classee}

Outputs something like:

<div class="first odd">This is the item’s title</div>
<div class="even">Another title</div>
<div class="odd">Another title</div>
<div class="even">A fourth title</div>
<div class="odd last">And the last title</div>