<dtml-if "BGCOLOR or VLINK"> should work ----- Original Message ----- From: Harry Henry Gebel <hgebel@inet.net> To: <zope@zope.org> Sent: Sunday, November 14, 1999 7:51 PM Subject: [Zope] How do I use "or" (|) with <dtml-if>
I have the following code for setting up colors:
<dtml-if BGCOLOR> <STYLE type="text/css"> BODY { background: <dtml-var BGCOLOR> } </STYLE> </dtml-if> <dtml-if VLINK> <STYLE type="text/css"> A:visited { color=<dtml-var VLINK> } </STYLE> </dtml-if>
I would like to have something like this:
<dtml-if BGCOLOR | VLINK> <STYLE type="text/css"> <dtml-if BGCOLOR> BODY { background: <dtml-var BGCOLOR> } </dtml-if> <dtml-if VLINK> A:visited { color=<dtml-var VLINK> } </dtml-if> </STYLE> </dtml-if>
Since this would eliminate having an extra STYLE tag. When expanded to include all the various optional tags that could be included this could save alot of space. However, I can not figure out how to use an "or" with dtml-if. I have not got that good of a handle on using python expressions with dtml, I assume this will be necessary. Of course, I could just take the <STYLE></STYLE> tags outside of any dtml-if, but this would leave an empty STYLE element in alot of pages which is aesthetically displeasing to me, although that is what I will do if I can't figure out a better way. Can anyone help me with this problem?
---------------------------------------------------------------------- Harry Henry Gebel ICQ# 43675297 West Dover Hundred, Delaware ----------------------------------------------------------------------
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope No cross posts or HTML encoding! (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )