New Planet & template question

Jeff Waugh jdub at perkypants.org
Fri Nov 16 20:19:29 EST 2007


<quote who="Oliver Spiesshofer">

> For a technical question I was wondering if you could tell me if it was
> possible to add a counter into a loop that would display an item only for
> the 1st/2nd/3rd/etc entry of the loop.

You can use htmltmpl's "magic loop variables" to do this:

<TMPL_LOOP variable>
<TMPL_IF __EVERY__3>
only show this on every third loop
</TMPL_IF>
</TMPL_LOOP>

http://htmltmpl.sourceforge.net/lang.html

- Jeff

-- 
linux.conf.au 2008: Melbourne, Australia        http://lca2008.linux.org.au/
 
      "Trying to get a PC to analyse one of the most abstract forms of
   language - the poem - is like trying to drill for oil with a banana."
                               - The Register


More information about the devel mailing list