As a newbie I am kind of confused by different techniques in zope. DTML I understand as a help to modularize websites by limiting a DTML method/document to a certain task. But this generated code is not usuable and workable with WYSIWYG tools and hence PAL is the method of choice since all these XML namespaces hide the stuff to the designers with their dreamweaver. But how do I now modularize my site with PAL in the DTML way? From the handbook I figured that DTML does not seem to be the method of choice since it is not usuable by the designer folks with their tools. So how to accomplish modularisation with PAL and how to transfer/use my old standard_html_header/footer? (I posted a similar inquiry yesterday, but due to high traffic I may and my newbie existense I kind of did not get any answer replying to that specific quest :-) Raphael
On Thu, Jan 09, 2003 at 02:54:13PM +0000, Raphael Arlitt wrote:
But this generated code is not usuable and workable with WYSIWYG tools and hence PAL
"PAL"? I assume you mean TAL, part of the trinity (TAL / TALES / METAL) that make up Zope Page Templates, aka Page Templates, aka ZPT.
But how do I now modularize my site with PAL in the DTML way?
Be aware that every ZPT must be valid XML, so you can't do some DTML-ish things such as put <html> in one template and the closing </html> in another. This takes a bit of getting used to, but it's really no bother. With that in mind, there are two ways I know to modularize your templates: 1) METAL macros. This allows you to create complete viewable pages and then insert bits of one page inside another page. too lengthy for me to describe here, but you can quickly get the idea from the Zope Book, chapter "Advanced Page Templates", section "Macros": http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx 2) <span tal:replace="structure here/name_of_other_template"> </span> This will replace the entire <span>...</span> with the result of rendering my_other_template. Roughly equivalent to <dtml-var my_other_template>. This violates the everything-is-a-complete-page principle, but I still find it useful. Of course it can be any other html tag besides <span>, and you can use tal:content instead of tal:replace if you want to insert things without removing the enclosing tag. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's AMAZING SCARECROW! (courtesy of isometric.spaceninja.com)
Raphael Arlitt wrote at 2003-1-9 14:54 +0000:
As a newbie I am kind of confused by different techniques in zope.
DTML I understand as a help to modularize websites by limiting a DTML method/document to a certain task.
But this generated code is not usuable and workable with WYSIWYG tools and hence PAL is the method of choice since all these XML namespaces hide the stuff to the designers with their dreamweaver.
But how do I now modularize my site with PAL in the DTML way? You use macros (--> "metal").
I think, this is quite nicely explained in the Zope Book, 2.6 edition. Download it from Zope.org... Dieter
participants (3)
-
Dieter Maurer -
Paul Winkler -
Raphael Arlitt