After reading all Zope docs, I have difficulties writing simple assignment and test.
<!--#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-->
The above gives error Error Type: KeyError, Error Value: 'big'. -- Milos Prudek
on 4. januar 2000 Milos Prudek wrote : MP> After reading all Zope docs, I have difficulties writing simple MP> assignment and test.
<!--#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-->
MP> The above gives error Error Type: KeyError, Error Value: 'big'. MP> -- MP> Milos Prudek you're closing your let-tag before testing for 'big'.. try : <dtml-let Size='big'> <dtml-if "Size=='big'"><h1></dtml-if> Hello. <dtml-if "Size=='big'"></h1></dtml-if> </dtml-let> -- Geir B Hansen web-developer/designer geirh@funcom.com http://www.funcom.com
you're closing your let-tag before testing for 'big'..
Okay. So let tag is defining a namespace, and I can define several variables within one let tag. What if I want to change a few of those variables inside the namespace? How can I iterate over a numeric or text variable? Anyway, I tried your code and it gave the same error as before. I also tried to add double quotes as you mentioned in your mail on 9.12.1999: <dtml-let "Size='big'"> <dtml-if "Size=='big'"><h1></dtml-if> Hello. <dtml-if "Size=='big'"></h1></dtml-if> </dtml-let> but I could not even save my changes ("invalid parameter: ""Size='big'"", for tag <dtml-let "Size='big'">, on line 6 of index_html"): -- Milos Prudek
on 4. januar 2000 Milos Prudek wrote :
you're closing your let-tag before testing for 'big'..
MP> Okay. So let tag is defining a namespace, and I can define several MP> variables within one let tag. What if I want to change a few of those MP> variables inside the namespace? How can I iterate over a numeric or text MP> variable? MP> Anyway, I tried your code and it gave the same error as before. I also MP> tried to add double quotes as you mentioned in your mail on 9.12.1999: sorry for sending untested code.. you're right, it doesnt work.. this one will do what you want, althouth in a slightly diferent way : <dtml-with "_.namespace(Size='big')"> <dtml-if "Size=='big'"><h1></dtml-if> Hello. <dtml-if "Size=='big'"></h1></dtml-if> </dtml-with> -- Geir B Hansen web-developer/designer geirh@funcom.com http://www.funcom.com
participants (2)
-
Geir B Hansen -
Milos Prudek