On a related note: Is there a way to get indirection on the field name provided to a <dtml-in Folder sort="SomeVariableFieldIdHere"> ? I've tried beaucoup variations without success. I've looked at the python, and I'm not sure that the trick would be. Is it just impossible? If it is impossible, should I be moving to ZClasses, and migrate my dtml code into python with DTML templates instead of just vanilla dtml? Any help appreciated. Thanks, = Joe = Martijn Pieters wrote:
At 07:45 23/08/99 , Timothy Grant wrote:
<dtml-var Category> gives me the part of the variable name before the underscore.
I tried to get <dtml-var expr="<dtml-var Category> + '_qty'"> to work, but that generates syntax errors.
Above line is a nested DTML tag, which doesn't work.
You have to ask the namespace for the variable with the name that consists of the string contained in the variable Category, concatenated to the string literal '_qty':
<dtml-var "_[Catagory + '_qty']">
_[...] is the namespace lookup, and you look up variable named by the string made up from Category + '_qty'.
-- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )