RE: [Zope] Sequences and SQL and that DTML Syntax Monstrosity Aga in :)
(Was fun to read all the nuances gathered together - nice job michel - practically the start of a topic guide. One nuance that i didn't notice is additional leniency that the non-quoted ("name=", non-expr) dtml style offers. Eg, the expression
<!--#if green_eggs-->
will evaluate to true if the var (or method) green_eggs exists and evaluates true. Otherwise it will evaluate to false. On the other hand,
<!--#if "green_eggs"-->
... (was fun to see Ken submit an entire message parenthetically:) I have to admit that the new "experimental" syntax has helped me break some old habits and generate more expr="readable()" code. Part of it's due to the fact that now I can train Alpha to do some shortcuts (autocomplete, yay!) and prevent me from doing the less-understandable-shortcuts. And now, even outside of my cozy li'l editors and inside the harsh reality of <textarea>, I find myself entering: <dtml-if name="green_eggs"> <!--green eggs exists, lets check ham--> <dtml-if name="ham"> <!--alright, ham too! lets check the color--> <dtml-if expr="ham.color=='green'"> <p style="color: green">Green eggs <em>and</em> ham!</p> <dtml-else> <dtml-with name="ham"> <p style="color: &dtml-color;">Green eggs and <em><dtml-var name="color"></em> ham. :(</p> </dtml-with> </dtml-if> </dtml-if> </dtml-if> Kinda purdy, ain't it? :)
participants (1)
-
Jeffrey Shell