Yeah I forgot, you have to set loop_context_vars to true. I have my code setup to do this by default .. :-). Been a long time since I've looked at it.
__FIRST__ __LAST__ __INNER__ __ODD__ __COUNT__ And if that's not enough for you, I've got a routine around here somewhere that I use to add __SECOND__ that's helped out in a few sticky situations, as well as __MIDDLE__ and __THIRD__ (gets added twice) for when I want to split some loop content between 2 or 3 columns, basically to let me call a <tmpl_if name='__MIDDLE__'></td><td></tmpl_if> to split the columns. --- Steve Comrie ----- Original Message ----- From: "Joel Gwynn" <[EMAIL PROTECTED]> To: "'Steve Comrie'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, October 21, 2004 12:08 PM Subject: RE: [cgiapp] getting data into a param > That is COOL! I've been using HTML::Template for years, and never knew > about loop_context_vars > > Thanks. > > > Then in your .tmpl file, something like this > > > > <tmpl_loop name='list'> > > <tmpl_if name='__ODD__'> > > ODD ROW - <tmpl_var name='first_name'> <tmpl_var name='surname'> > > <tmpl_else> > > EVEN ROW - <tmpl_var name='first_name'> <tmpl_var name='surname'> > > </tmpl_if> > > </tmpl_loop> > > > > > > Hope that helps > > > > > > --- > > Steve Comrie > > > > > > > --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
