I've been using HTML::Template for almost two years now, and I've encountered this problem, and others, several times.

Those who have already answered your question have pointed out that there isn't a neat way of doing this. I've found HTML::Template's limitations frustrating, but that hasn't stopped me using the module. The great thing about HTML::Template is that non-programmers find it intuitive enough. Too many templating systems are great for programmers, but don't suit other members of a Web team.

Admittedly one site I worked on would have been better suited to Template Toolkit, as it is based on complicated logic that doesn't fit with HTML::Template's philosophy. However, many Web applications I've developed fit well with simple looping and variable substitution: in such cases HTML::Template is a great way of keeping both desingers and programmers happy.

I realise that this isn't a direct answer to your question, but I wanted to make a point: HTML::Template might not be complex enough allow programmers to do things as simply as they'd like, but in Web development it's tough to find a solution that everyone involved is happy with. I've found HTML::Template does a good job of keeping everyone relatively happy.


In reply to Re: HTML::Template - Two columns? by tomhukins
in thread HTML::Template - Two columns? by mikeB

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.