Hey all,

I have some html that I want to repeat 1x only if a
certain condition is met, otherwise repeat how many
times it has to ala...

Keep in mind that what needs to output is a HUGE
amount of html...so I don't want to do an If/else with
huge code. I could put that html code in block..but it
seems childish....is there a shnazzy way to do
this...I can't really set a var at the end of the
first iteration because there are other tests on the
page that would need the same tests..

bascially, do this once if this contingency exists,
otherwise just repeat as a foreach loop would require.

FOREACH somecode

  IF thisvar == 1 && loop.first;
       some html code;
  ELSE
       some html code;
  END;

END;

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to