Unlike the many HTML::Template and CGI::Fasttemplate followers, I designed a similar system using Text::Template. My site, however, involved only a few templates for many layers. (e.g. Home page, 2nd-level pages (any any deeper)). The goal was to separate the site into three parts: Content, for non-computer people to edit. TEmplates, for interface people to edit, and code, for programmers.

It works like this:

The result is two-fold. The goal of separation has occured, allowing us to quickly re-build and add onto parts of the site. Also, because there is a difference between the base content files and the actual "built" HTML files, we have an effective Staging Area for content to be reviewed and approved before going Live. Combining this last part with some simple RCS has given us a measure of control and version history as well. Also, we can simply point our build script at a different set of templates, and generate a sub-site that is (for example) for text-only. No need to duplicate content. In case you are curious, Content pages look like this:
<!!&SiteBuilder_Load($Header,$ID)!!> Uneditable content <!!$BeginText!!> Editable Content <!!$EndText!!> more uneditable content <!!&SiteBuilder_Load($Trailer, $ID)!!>
(<!! and !!> are the tags I choose for Text::Template)

In reply to Re: Design vs. Code vs. Maintenance by swiftone
in thread Design vs. Code vs. Maintenance by BBQ

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.