Enitity syntax and 2.2
Hi, Just wondering if the entity syntax has been updated in 2.2 yet so I could do something like the following: &dtml.url-/folder/object/method; cheers, Chris
Shane Hathaway wrote:
Just wondering if the entity syntax has been updated in 2.2 yet so I could do something like the following:
&dtml.url-/folder/object/method;
Hmm. Nope.
*grumble* *mumble* *moan* ;-)
Ought to be though, IMHO. Collector?
Damn right... and done: http://classic.zope.org:8080/Collector/1436/view thanks for the info, Chris :-)
And how about: &dtml.missing-REQUEST.form['foo']; That is, allow expressions to be used. I guess this makes the entity syntax act more like <dtml-var>. This would allow a really clear syntax for refilling <input type=text> tags with previously entered values in a form. ------------------------------------------------------ Andres Corrada-Emmanuel Email: andres@corrada.com ------------------------------------------------------
On Fri, Jul 21, 2000 at 10:05:08AM +0100, Chris Withers wrote:
andres@corrada.com wrote:
And how about:
&dtml.missing-REQUEST.form['foo'];
over my dead body! ;-)
I thought the point of the entity syntax was to keep it simple... which including python expressions does not...
Okay, let me see how I can roll over you! ;-) Perhaps you can suggest a simple way to do something like the following: <dtml-if "REQUEST.form.has_key('foo')"> <dtml-let previouslyEnteredValue="REQUEST.form['foo']> <input type=text ... value="&dtml-previouslyEnteredValue;"> </dtml-let> <dtml-else> <input type=text ... value=""> </dtml-if> ------------------------------------------------------ Andres Corrada-Emmanuel Email: andres@corrada.com ------------------------------------------------------
+----[ andres@corrada.com ]--------------------------------------------- | | Perhaps you can suggest a simple way to do something like the following: | | <dtml-if "REQUEST.form.has_key('foo')"> | <dtml-let previouslyEnteredValue="REQUEST.form['foo']> | <input type=text ... value="&dtml-previouslyEnteredValue;"> | </dtml-let> | <dtml-else> | <input type=text ... value=""> | </dtml-if> Replace the whole mess with:- <input type="TEXT" value="&dtml.missing-foo;"> -- 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 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
Thanks guys,
Replace the whole mess with:-
<input type="TEXT" value="&dtml.missing-foo;">
<input type=text ... value="<dtml-var "REQUEST.for['foo']" html_quote missing>
------------------------------------------------------ Andres Corrada-Emmanuel Email: andres@corrada.com ------------------------------------------------------
There ya go: <input type=text ... value="<dtml-var "REQUEST.for['foo']" html_quote missing> cheers, Chris
andres@corrada.com wrote:
Perhaps you can suggest a simple way to do something like the following:
<dtml-if "REQUEST.form.has_key('foo')"> <dtml-let previouslyEnteredValue="REQUEST.form['foo']> <input type=text ... value="&dtml-previouslyEnteredValue;"> </dtml-let> <dtml-else> <input type=text ... value=""> </dtml-if>
<dtml-let value="REQUEST.get('foo', '')"> <input type=text ... value="&dtml-value;"> </dtml-let> This is probably the best you're going to get. :-) Shane
participants (4)
-
andres@corrada.com -
Andrew Kenneth Milton -
Chris Withers -
Shane Hathaway