Optional In and As

Problem

No problem :-)

Proposal

Allow noise particles ‘in’ and ‘as’ in ‘tal:repeat’ and ‘tal:define’:

tal:repeat="item in here/items"

tal:define="x as request/form/x"

Don’t require them, though.

Comments

n.larosa (Jun 17, 2001 4:50 am; Comment #1) –
Yes, please! My Templates are getting a little dense, and those repeats are getting difficult to (visually) decode in a hurry. (Yes, I do am careful to delegate all logic I can to separate scripts.) Gimme gimme gimme. ;^)
peterbe (Jul 16, 2001 3:58 am; Comment #2) –

0

Not a scientist my self so I don’t know what laws and principles apply to templating syntaxes such as ZPT.

One thing I really like about Python is that there is only one way of writing things and that isn’t too hard to learn. More alternatives will confuse users (especially new ones) Smells like the confusion ‘<dtml-var name=”peter”>’ and ‘<dtml-var peter>’

mindlace (Jul 18, 2001 2:07 pm; Comment #3) –
+1 if it is promoted as the canonical way, and the other is eventually deprecated. Otherwise, keep the original syntax.
tanghus (Jul 29, 2001 6:58 am; Comment #4) –
+1 (As comment #3)
poster (Jul 31, 2001 11:30 am; Comment #5) –
+1 (“Me too” with mindlace’s reservation)
dracvl (Oct 25, 2001 4:21 am; Comment #6) –
Yes, please. The syntax looks much better this way, and will surely help newcomers to Page Templates.