Hi, I was wondering if there is some such thing as a HTML Document, ie: one in which no DTML is parsed. There's a couple of reasons I'm asking: 1. I remember the most confusing thing when I started using Zope was 'what the hell do I select from that add dropdown list to get a web page?' DTMl document/method scared me 'cos I didn't know what they meant. Had there been an HTML document, I would have been a lot more comfortable ;-) 2. It would provide a 'safer' object for users of a site to add. I'd be much happier to let site users/members create a document if I knew they couldn't put DTML in it and start breaking my site ;-) Thinking about this, it should be dead simple to do as a product, so if people think it's a good idea, I'll go ahead and do it :-) cheers, Chris
I was wondering if there is some such thing as a HTML Document, ie: one in which no DTML is parsed.
I've noticed that too.
There's a couple of reasons I'm asking:
1. I remember the most confusing thing when I started using Zope was 'what the hell do I select from that add dropdown list to get a web page?' DTMl document/method scared me 'cos I didn't know what they meant. Had there been an HTML document, I would have been a lot more comfortable ;-)
Exactly. There's the option of uploading a file, and setting the content-type to text/html, but that kinda sucks (you can't edit online, can you?). There _should_ be some sort of HTML document, where there's no DTML parsing; I have snippets of HTML in DTML methods that could do well without the parsing. Alternatively, there could be a toggle on DTML Methods / Documents that specifies whether or not you want to parse it.
2. It would provide a 'safer' object for users of a site to add. I'd be much happier to let site users/members create a document if I knew they couldn't put DTML in it and start breaking my site ;-)
Very good point. =)
Thinking about this, it should be dead simple to do as a product, so if people think it's a good idea, I'll go ahead and do it :-)
Sweet. Maybe I'll hack the DTML Methods and Documents.. -Morten
"Morten W. Petersen" wrote:
Thinking about this, it should be dead simple to do as a product, so if people think it's a good idea, I'll go ahead and do it :-)
Sweet. Maybe I'll hack the DTML Methods and Documents..
The idea which crossed my mind was to subclass DTML Document and replace the render method which one that returned something like html_quote(self.raw()). I wonder if I'd need to set any content types? Chris
The idea which crossed my mind was to subclass DTML Document and replace the render method which one that returned something like html_quote(self.raw()).
That would bring up HTML in a rendered page. I don't think that's what you want. That would be ok for editing tho.
I wonder if I'd need to set any content types?
I don't think you have to do that if you use <DOCTYPE or <HTML around the start of the document, it should "take care of itself". -Morten
"Morten W. Petersen" wrote:
The idea which crossed my mind was to subclass DTML Document and replace the render method which one that returned something like html_quote(self.raw()).
That would bring up HTML in a rendered page. I don't think that's what you want. That would be ok for editing tho.
Sorry, don't follow you... the rendered page should be the same as the raw contents of the HTML document, surely?
I wonder if I'd need to set any content types?
I don't think you have to do that if you use <DOCTYPE or <HTML around the start of the document, it should "take care of itself".
Might still be nixe to set the content-type to text/html I think Zope might get upset if you don't. Chris PS: Just had another thought (what two in a day?!): How about removing the DTML Document object type and replacing it with a simple 'Document' class where you can choose the encoding a la ZWiki 0.6. The default would be DTML with options for Plain Text, Structured Text and HTML. The ability to change the encoding should be controlled by a permission so it's nice and secure. comments?
On 12 May 2000, Chris Withers said:
I was wondering if there is some such thing as a HTML Document, ie: one in which no DTML is parsed. [...] Thinking about this, it should be dead simple to do as a product, so if people think it's a good idea, I'll go ahead and do it :-)
Sounds like a useful product, but don't forget that a major selling point for DTML and acquisition is that you can put standard headers and footers into your HTML documents. ;-) You might want some sort of provision in your mythical "HTML Document" product to allow "standard_html_header" and "standard_html_footer" to be interpolated appropriately. Perhaps a checkbox when creating/editing the document? Greg -- Greg Ward - software developer gward@mems-exchange.org MEMS Exchange / CNRI voice: +1-703-262-5376 Reston, Virginia, USA fax: +1-703-262-5367
Greg Ward wrote:
You might want some sort of provision in your mythical "HTML Document" product to allow "standard_html_header" and "standard_html_footer" to be interpolated appropriately. Perhaps a checkbox when creating/editing the document?
Replacing the mythical "HTML Document" with my next lightbulb, the mythical "Document", how about the render method taking an argument, say an integer, with the following meanings: 1. Just chuck out my contents (a real, flat, HTML page or a normal DTML document) 2. Chuck out my contents, but without headers for footers (no <HTML><HEAD></HEAD><BODY></BODY></HTML>), this could be used when including the document somewhere else, for example: with a <dtml-var Doc> 3. Chuck out my contents wrapped in <dtml-var standard_html_header> and <dtml-var standard_html_footer> which are obtained through normal aquisitioneqsue methods. comments? cheers, Chris
Sounds like a useful product, but don't forget that a major selling point for DTML and acquisition is that you can put standard headers and footers into your HTML documents. ;-)
But standard headers and footers themselves are simple HTML documents (sometimes). So I like this idea. -- connection reset by Peer _______________________________________________________________________ Dr. Peer Griebel Tel. +49 7581 4831 23 Geschäftsführer Fax. +49 7581 4831 11 Knoll Informationssysteme GmbH http://www.knoll-is.de Dreiköniggasse 17 mailto:peer@knoll-is.de 88348 Saulgau privat: mailto:peer.griebel@gmx.de
participants (4)
-
Chris Withers -
Dr. Peer Griebel -
Greg Ward -
Morten W. Petersen