I'm using the HTML::Template in my project. The examples given in the tutorials are pretty simple - one or two tables. However, if you take a normal website, it contains 2-3 menus, a few link boxes, page content, header, footer and other things. So, there is a need to break the homepage into small templates. Here we go: I have ~ 30-50 templates in my project. I'd liked to hear from othe perl monks how they deal with such situation, because I believe most of the websites are pretty complicated.

I use HTML::Template together with DBIx::Recordset at my work. As I have already noted I have ~ 30-50 templates for different entry forms and website components such like button groups. I use template includes and loops, trying to make them as abstract as possible.

I'd liked to hear if anyone is writing such modules like Menu.pm that loads its entries from the database and knows how to display its items using the templates. There are many components which I needed for my website and had to write myself. I believe there must be frameworks like that around, but I don't know any.


In reply to Re: HTML::Template - complex sites by Heidegger
in thread HTML::Template by defyance

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.