![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Can HTML::Template do this?by Cody Pendant (Prior) |
on Apr 26, 2004 at 22:56 UTC ( #348349=perlquestion: print w/replies, xml ) | Need Help?? |
Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question: I produced a number of web "image gallery" pages, but I didn't use HTML::Template. Mea Culpa. Having got that out of the way, here's what I had to do. I produced tables in the following form, from either odd- or even-numbered lists of images: but sometimes, if there were an odd number of images:
So how exactly *would* I do that with HTML template, next time around? My method this way was to have an odd-numbered cell chunk of code, which started a TR, and an even-numbered cell which ended one, and test for "having run out of content on an odd number" and dump in the blank cell chunk of code if necessary. I'm scratching my head over the HTML::Template doco and trying to figure out how I would have done this -- any ideas? ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
Back to
Seekers of Perl Wisdom
|
|