I'm a Zope beginner. I'd like to surround text 'Hello' with <h1></h1> tags, if variable (not attribute) Size is equal to 'big'. I tried this: <!--#var standard_html_header--> <dtml-let Size='big'></dtml-let> <dtml-if Size='big'><h1></dtml-if> Hello. <dtml-if Size='big'></h1></dtml-if> <!--#var standard_html_footer--> When I click on Change, I get this: Invalid attribute name, "size", for tag <dtml-if Size='big'>, on line 4 of index_html -- Milos Prudek
+----[ Milos Prudek ]--------------------------------------------- | I'm a Zope beginner. | | I'd like to surround text 'Hello' with <h1></h1> tags, | if variable (not attribute) Size is equal to 'big'. I tried this: | <dtml-if Size='big'><h1></dtml-if> <dtml-if "Size='big'">... Double quotes need to surround expressions. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
<dtml-if "Size='big'">...
Double quotes need to surround expressions.
.. and also you need to let the 'let'-tag surround the pieces where you'd like Size to be 'big' .. In your original code, you closed it before the if-tags.. try this : <dtml-let "Size='big'"> <dtml-if "Size=='big'"><h1></dtml-if> Hello. <dtml-if "Size=='big'"></h1></dtml-if> </dtml-let> ------------------------------------------------ Geir B Hansen geirh@funcom.com Web-designer / Graphic artist Funcom Oslo http://www.funcom.com ------------------------------------------------
participants (3)
-
Andrew Kenneth Milton -
Geir B Hansen -
Milos Prudek