Clear questions and runnable code
get the best and fastest answer
HTML attribute based template language for perl?by jeorgen (Pilgrim)
|on Sep 07, 2002 at 12:34 UTC||Need Help??|
jeorgen has asked for the wisdom of the Perl Monks concerning the following question:
Is there a template language for perl like Zope's TAL/TALES ?
Most template languages today suffer from a tag-invention frenzy. It is in many ways smarter to embed template instructions in attributes of existing elements like so:
The code is taken from the Zope page template documentation. Please note that dummy information is also present. It's also possible to fake more rows to make for a more realistic template to layout.
This week I coded an cgi app for a campaign for a customer using HTML::Template as template language. The customer wanted a lot of last-moment changes and in the end it was pretty well nigh impossible to make any WYSIWYG changes with FrontPage 2000 (FP2000 does otherwise a good job of leaving the Template tags alone).
The customer had problems editing the look of the campaign and some dummy contents had been perfect. Is there or is there underway such HTML attribute based template language with dummy contens for perl?
A criticism raised at languages such as Zope page template is that you often build up a page from smaller parts, and so, there is no whole page for the page designer to edit. Hower in Zope page templates there is a macro language, METAL, that allows insertion of components. And when editing a template, these macros are evaluated. To quote the documentation:
"If you check the Expand macros when editing option on the Page Template Edit view, then any macros that you use will be expanded in your template's source. This is Zope's default behavior, and in general this is what you want, since it allows you to edit a complete and valid page."
Here is a discussion from advogato on the same subject. cheers