[Zope] avoiding dtml recursion
Warnes, Gregory R
gregory_r_warnes@groton.pfizer.com
Thu, 16 May 2002 18:00:30 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1FD25.18386190
Content-Type: text/plain;
charset="iso-8859-1"
OK, I've found one solution. Its not pretty, but it works:
<!-- Make sure we only get this notice once --!>
<dtml-unless "REQUEST.get('voodoo',None)==1">
<p>
<center><FONT SIZE=+1 COLOR=#FF0000>PRE-RELEASE
VERSION</FONT></center>
</p>
<dtml-call "REQUEST.set('voodoo',1)">
</dtml-unless>
<dtml-with aq_parent only>
<dtml-var standard_html_footer>
</dtml-with>
Does anyone else have a better solution?
-Greg
-----Original Message-----
From: Warnes, Gregory R [mailto:gregory_r_warnes@groton.pfizer.com]
Sent: Thursday, May 16, 2002 4:34 PM
To: zope@zope.org
Subject: [Zope] avoiding dtml recursion
Hi all
I want to have a dtml file <standard_html_footer> that includes the contents
of a <standard_html_footer> defined higher in the hierarchy.
I tried
<p>
<center><FONT SIZE=+1 COLOR=#FF0000>PRE-RELEASE VERSION</FONT></center>
</p>
<dtml-with aq_parent only>
<p><dtml-var standard_html_footer></p>
</dtml-with>
</body>
</html>
This works in the directory where this dtml-method is, however, I get
another 'PRE-RELEASE VERSION' tacked on for every level down I go.
What is the proper way to get around this?
Thanks
-Greg
LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be
privileged. It is intended for the addressee(s) only. Access to this E-mail
by anyone else is unauthorized. If you are not an addressee, any disclosure
or copying of the contents of this E-mail or any action taken (or not taken)
in reliance on it is unauthorized and may be unlawful. If you are not an
addressee, please inform the sender immediately.
------_=_NextPart_001_01C1FD25.18386190
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4616.200" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=546575021-16052002>OK,
I've found one solution. Its not pretty, but it works:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=546575021-16052002></SPAN></FONT> </DIV>
<DIV><FONT face=Courier color=#0000ff size=2><SPAN
class=546575021-16052002> <FONT face=Arial><!-- Make sure
we only get this notice once --!></FONT></SPAN></FONT></DIV>
<DIV><FONT face=Courier color=#0000ff size=2><SPAN
class=546575021-16052002> <dtml-unless
"REQUEST.get('voodoo',None)==1"> </SPAN></FONT></DIV>
<DIV><FONT face=Courier color=#0000ff size=2><SPAN
class=546575021-16052002> </SPAN></FONT></DIV>
<DIV><FONT face=Courier color=#0000ff size=2><SPAN
class=546575021-16052002>
<p><BR> <center><FONT SIZE=+1
COLOR=#FF0000>PRE-RELEASE
VERSION</FONT></center><BR>
</p></SPAN></FONT></DIV>
<DIV><FONT face=Courier color=#0000ff size=2><SPAN
class=546575021-16052002> </SPAN></FONT></DIV>
<DIV><FONT face=Courier color=#0000ff size=2><SPAN
class=546575021-16052002> <dtml-call
"REQUEST.set('voodoo',1)"><BR>
</dtml-unless></SPAN></FONT></DIV>
<DIV><FONT face=Courier color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Courier color=#0000ff size=2><SPAN
class=546575021-16052002> <dtml-with aq_parent
only><BR> <dtml-var
standard_html_footer><BR>
</dtml-with></SPAN></FONT></DIV>
<DIV><FONT face=Courier color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=546575021-16052002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=546575021-16052002>Does
anyone else have a better solution? </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=546575021-16052002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=546575021-16052002>-Greg</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Warnes, Gregory R
[mailto:gregory_r_warnes@groton.pfizer.com]<BR><B>Sent:</B> Thursday, May 16,
2002 4:34 PM<BR><B>To:</B> zope@zope.org<BR><B>Subject:</B> [Zope] avoiding
dtml recursion<BR><BR></FONT></DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff size=2>Hi
all</FONT></SPAN></DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923170720-16052002>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff size=2>I
want to have a dtml file <standard_html_footer> that includes the
contents of a <standard_html_footer> defined higher in the
hierarchy.</FONT></SPAN></DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff size=2>I
tried</FONT></SPAN></DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff
size=2> <p><BR>
<center><FONT SIZE=+1 COLOR=#FF0000>PRE-RELEASE
VERSION</FONT></center><BR>
</p></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=923170720-16052002> </SPAN></FONT></DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff
size=2> <dtml-with aq_parent
only><BR> <p><dtml-var
standard_html_footer></p><BR>
</dtml-with></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=923170720-16052002> </SPAN></FONT></DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff
size=2> </body><BR>
</html></FONT></SPAN></DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff size=2>This
works in the directory where this dtml-method is, however, I get another
'PRE-RELEASE VERSION' tacked on for every level down I go.
</FONT></SPAN></DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=923170720-16052002><FONT face=Arial color=#0000ff size=2>What
is the proper way to get around this</FONT></SPAN><FONT face=Arial><FONT
color=#0000ff><FONT size=2><SPAN
class=923170720-16052002>?</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=923170720-16052002></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=923170720-16052002>Thanks</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=923170720-16052002></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=923170720-16052002>-Greg</SPAN></FONT></FONT></FONT></SPAN></DIV></DIV><CODE><FONT
size=3><BR><BR>LEGAL NOTICE<BR>Unless expressly stated otherwise, this message
is confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are not an
addressee, any disclosure or copying of the contents of this E-mail or any
action taken (or not taken) in reliance on it is unauthorized and may be
unlawful. If you are not an addressee, please inform the sender
immediately.<BR></BLOCKQUOTE></FONT></CODE></BODY></HTML>
------_=_NextPart_001_01C1FD25.18386190--