Does contemplate support a row counter or stripe variable like views does?

In other words something that keeps track of which teaser is being displayed on a page. This allows things like alternating colours for rows or doing things like putting teasers into a multi-column table.

I can't seem to find this in any of the variables that exist when the teaser tpl is hit.

Peter Lindstrom
LiquidCMS - Content Management Solution Experts

Comments

jjeff’s picture

Status: Active » Closed (won't fix)

That type of behavior can (and should) be handled at the theme layer.

liquidcms’s picture

hmm, yes, ok i guess that makes sense and is comparable to what view templating does.

so basically (in reverse order) we have:

page.tpl -> node.tpl -> teaser (contemplate)

and i think you are suggesting it should be done in the node.tpl .. and i just looked and sure enough there it is... $variables['id'] gives a running count (although likely not a paged version of it).

thanks,