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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |