Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

[Zope-PTK] STX_Document

 

 

Zope cmf RSS feed   Index | Next | Previous | View Threaded


roeder at berg

Feb 15, 2000, 2:24 PM

Post #1 of 2 (67 views)
Permalink
[Zope-PTK] STX_Document

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


paul at digicool

Feb 16, 2000, 6:35 AM

Post #2 of 2 (64 views)
Permalink
Re: [Zope-PTK] STX_Document [In reply to]

FWIW, we know that we should overhaul the concept of documents in Zope.
Michel Pelletier started a thread about "multi-format documents" on the
Zope list about four months ago.

Consider the work on PTK to be experimentation with various ideas for
future Zope releases.

--Paul

Maik Roeder wrote:
>
> 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
>
> _______________________________________________
> Zope-PTK maillist - Zope-PTK [at] zope
> http://lists.zope.org/mailman/listinfo/zope-ptk

Zope cmf RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.