[Zope] User Specifies dtml template
Dieter Maurer
dieter@handshake.de
Wed, 7 Feb 2001 22:02:27 +0100 (CET)
Tom Freeman writes:
> How can I create a user defined dtml document?
> What I want to do is to have an option to create 'toms dtml document',
> this will contain:
>
> <dtml-var standard_html_header>
> <dtml-var header>
> <dtml-var header-about>
>
> <!-- Content starts here -->
>
> <!-- Content ends here -->
>
> <dtml-var footer>
> <dtml-var standard_html_footer>
>
> instead of the standard:
>
> <dtml-var standard_html_header>
> <h2><dtml-var title_or_id></h2>
> <p>
> This is the <dtml-var id> Document.
> </p>
> <dtml-var standard_html_footer>
>
> how can I do this? is this possible?
It is hard coded in "OFS.DTMLMethod.default_dm_html" and
"OFS.DTMLDocument.default_dd_html", respectively.
Of cause, you can change the code....
But, you can also go for a ZClass.
Give it an "index_html" method that combines a header, the content
and a footer. Let your user only be concerned with the content.
Dieter