RE: [Zope] tag suggestions: format tag
I think it's a good suggestion, but it'd be neat if the tag could accept an inline expression. Something like: <!--#format expr="Hello world" formatter="StructuredText"--> would be equivalent to <!--#format StructuredText-->Hello world<!--#/format--> And <!--#format name=MyDocument formatter="StructuredText"--> would be equivalent to <!--#format StructuredText--><!--#var MyDocument--><!--#/format--> Comments? Regardless of the exact syntax, I think we're on the lead of an important feature currently missing in Zope. -- Alexander Staubo http://www.mop.no/~alex/ "`This must be Thursday,' said Arthur to himself, sinking low over his beer, `I never could get the hang of Thursdays.'" --Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
-----Original Message----- From: Jay, Dylan [mailto:djay@lucent.com] Sent: 23. juli 1999 05:28 To: 'zope@zope.org' Subject: [Zope] tag suggestions: format tag
Along the same lines as <!--#var Object fmt="DisplayMethod-->, I propose the ability to do that at definition time instead of when you call the document. Lets say I want a section of Structured text in DTML document I could do the following
<!--#format StructuredText--> *Item 1 *Item 2 <!--#/format-->
or if I want to plain text (and not have DTML processed) I could do the following
<!--#format PlainText-->
<!--#var "This line won't be rendered"-->
<!--#/format-->
Good idea or not?
My rationale is as follows. 1. I want to be able to add documents in various formats. The format is fixed at creation time. I don't want to have to tell zope how to render something everytime it is to be rendered. A structured text document is a structured text document. An alternative way of doing this is to have another property of a document specifying how it is to rendered. 2. How do I display DTML syntax in a DTML document?
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Alexander Staubo