I'm trying to figure out how ttree or TT2Site is going to figure out what code to run as part of each template. For example, one page is a list of officers in the group. So, I need to query the officers "table" via DBD::CSV, ordered by a certain value. Another page is a list of activities, grouped by month. So I need to query the activities "table", ordered and grouped - and I need to figure out the current date and only get the activities in the current "activity year" (related to the school year - starts in September). Another page is a list of these activities with descriptions and the person who runs them, which is sometimes tied to the officers. So here's a query against a couple of tables.

These queries are already done, and they work. I just need to tie them in to the templates and either generate them statically or dynamically, depending on context. And I figured that with perl's great use of context, this would be a perfect fit ... somewhere. ;-)

And putting code of any sort into the template wasn't exactly what I was hoping for.


In reply to Re^4: Generation of dynamically-static documents by Tanktalus
in thread Generation of dynamically-static documents by Tanktalus

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.