[ZPT] ZPT document display
Tom Deprez
Tom Deprez" <tom.deprez@uz.kuleuven.ac.be
Thu, 4 Oct 2001 11:14:36 +0200
Dit is een meerdelig bericht in MIME-indeling.
------=_NextPart_000_00C2_01C14CC5.C085B160
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I'm using ZPT now through the zope management interface, and I will =
probably access it a lot like this. Now I'm wondering if it is possible =
to make another view (next to non expand macros and expand macros). Or =
perhaps 'expand macros' is already capable of doing the following, =
however I haven't found out how.
In dtml is was possible to write something like:
<dtml-var standard_html_header>
xxx
<dtml-var standard_html_header>=20
This reduced the code on the page (to write, but also to view).
Now, to reduce code (or unify the look of the pages) in ZPT we can use =
macro's and slots.
When we use the following code:
<p metal:use-macro=3D"here/master_page/macros/standard" />
If we expand the macros: we get the whole (may I say 'inherited'?) macro =
page
If we don't expand the macros then we see only above code (which returns =
us to to the DTML effect of reducing code to view)
Now, it looks that when I define slots in the page, I have to expand the =
macro in order to fill in the slots, since otherwise this doesn't =
work...
Is it possible to make another view (devoted to working through the Zope =
interface of course, since you won't need this when working with eg =
dreamweaver), which shows only the code which is different from the =
macro's or which need to be filled in?
This allows us to view big ZPT pages and analyse them more easely =
through the zope management interface as well.
Because you only see the code related to the document in the ZPT. All =
other is hided.
Or am I misusing macro's and slots here?
Thanks, Tom.
------=_NextPart_000_00C2_01C14CC5.C085B160
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm using ZPT now through the zope =
management=20
interface, and I will probably access it a lot like this. Now I'm =
wondering if=20
it is possible to make another view (next to non expand macros and =
expand=20
macros). Or perhaps 'expand macros' is already capable of doing the =
following,=20
however I haven't found out how.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>In dtml is was possible to write =
something=20
like:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-var =
standard_html_header></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>xxx</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-var=20
standard_html_header></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This reduced the code on the page (to =
write, but=20
also to view).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Now, to reduce code (or unify the look =
of the=20
pages) in ZPT we can use macro's and slots.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>When we use the following =
code:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2><p=20
metal:use-macro=3D"here/master_page/macros/standard" /></FONT></DIV>
<DIV> </DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If we expand the macros: we get the =
whole (may I=20
say 'inherited'?) macro page</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If we don't expand the macros then we =
see only=20
above code (which returns us to to the DTML effect of reducing code to=20
view)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Now, it looks that when I define slots =
in the page,=20
I have to expand the macro in order to fill in the slots, since =
otherwise this=20
doesn't work...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is it possible to make another view =
(devoted to=20
working through the Zope interface of course, since you won't need this =
when=20
working with eg dreamweaver), which shows only the code which is =
different from=20
the macro's or which need to be filled in?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV> </DIV>
<DIV>This allows us to view big ZPT pages and analyse them more easely =
through=20
the zope management interface as well.</DIV>
<DIV>Because you only see the code related to the document in the ZPT. =
All other=20
is hided.</DIV>
<DIV> </DIV>
<DIV>Or am I misusing macro's and slots here?</DIV>
<DIV> </DIV>
<DIV>Thanks, Tom.</DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_00C2_01C14CC5.C085B160--