I've actually been working on something similar at work, although the template system is just one small part of it. The other part is a web-based database/form designer - pretty much, I made some tools that allow you to design a database - what fields you want and then create a form to capture those fields - should this be a select box, a text area, an image upload? You can then populate a website directory with the information you capture.

part of the templating system features a templating language, where you have special tokens that are then parsed to their $real_value. Part of the language includes basic looping, so I could say:

[loop Company isnot Microsoft] [if foo] <blink> we have foo! - <b>[foo]</b></blink> [else] <p><i>no foo found for [name] :( [/if] [/loop]

I could also say something like:

[perl] my $var = 'yadda yadda.. bing!'; return $var [/perl]

to do things that are too complicated for the templating language.

I must say, the template parsing was a quite a challenge, I didn't use any outside modules, accept one's i created. Everything melds together quite nicely. We can now design, create, and build an entire dynamic section of a website in about an hour, something that would take me at least 2-3 days to hard code and debug.

After we're all set, we can give our client a simple for to manage the section.

 

-justin simoni
!skazat!


In reply to Re: CGI framework test 1. by skazat
in thread CGI framework test 1. by boo_radley

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.