[Zope-PTK] STX_Document

Maik Roeder roeder@berg.net
Tue, 15 Feb 2000 22:24:12 +0100


Hi !

> This sounds like something people would like. I agree that this is really,
> really simple. But, I've seen people coming from Frontierland and wondering
> why they need to include <dtml-var standard_html_header> when Frontier
> automatically includes headers and footers...

The index_html resides in the ZClass, so <dtml-var standard_html_header>
is already included automatically. People won't see the inclusion.
 
> An STX_Document class is also useful because otherwise you need to make a
> separate method to render the doc out to HTML, which seems a little hokey.

Why not use a simple Document ZClass and, given a property content_type
of html, stx or txt call the following from index_html ? (Could also be 
done via subclassing from generic Document ZClass).

<dtml-if "content_type=='html'">
     <dtml-var content>
<dtml-elif "content_type=='stx'">
     <dtml-var content fmt=structured-text>
<dtml-elif "content_type=='txt'">
     <dtml-var content html_quote newline_to_br>
</dtml-if>

Greetings, 

Maik Röder