Motatorious Monks,

On advice from other Monks in another thread, I'm reading all about Template::Toolkit. Very nice so far, but I wanted to check that I'm grasping the concepts and ramificiations.

http://www.devshed.com/c/a/Perl/Building-a-Complete-Website-using-the-Template-Toolkit/3/

This tutorial mentions:

The tpage program is fine for processing single templates, but isn’t really designed to handle the many pages that comprise a typical web site. For this, ttree is much more appropriate. It works by drilling down through a source directory of your choosing, looking for templates to process. The output generated is saved in a corresponding file in a separate destination directory.

But I don't have a million different templates. I'll have one or two templates to fill with hundreds of different contents. What I've got to start with is hundreds of content pages that I want to merge with a layout template to produce finished web pages. The above tutorial makes it sound backwards to me.

Next is how this is run. It speaks opf running tpage or ttree from the command line to generate pages that are stored as static html on the server. The pre-generating static html sounds great. But in this age of do-it-yourself web authors, I can hardly ask office staff who are authoring content to telnet into the server to run this everytime they make a change to their content page. Way too cumbersome.

Is there not some way to do this automatically?

Thanks.




Forget that fear of gravity,
Get a little savagery in your life.

In reply to Learning Template::Toolkit - have I understood? by punch_card_don

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.