Christopher Rivard wrote:
http://groups.yahoo.com/group/zope/message/150345
I'm working offline, so can't see what you're refering to.
The solution that I have come to is to simply set a cookie and serve up
the correct fields based on the cookie:
dtml-if 17 in list_map_dir_id and 21 not in
J Cameron Cooper wrote:
Just make sure that the elements of the list you're getting are what you
think they are. If you ask about the integer 17 and the list actually
has a string 17 they won't match. You can either adjust what you test
or use something like the 'int' function to cast.
Also
On 12/4/05, J Cameron Cooper [EMAIL PROTECTED] wrote:
Christopher Rivard wrote:
Hello,
I'm am trying to check for the membership of items in a list and think
I'm missing something.
How is this done in dtml?
List allids: [15,16,17,18]
Check for multiple items in the list:
Thanks Peter,
The conditional within the dtml did the trick.
This is a continuation of this issue (a bit cumbersome):
http://groups.yahoo.com/group/zope/message/150345
The solution that I have come to is to simply set a cookie and serve up
the correct fields based on the cookie:
dtml-if 17
I suggest you try a little scripting language called Python.
You can use in inside Zope by creating Python Scripts (formal name:
Script (Python))
Try to stay away from DTML as much as possible. It's only about as
good as PHP alone.
On 12/4/05, Christopher Rivard [EMAIL PROTECTED] wrote:
Thanks
Christopher Rivard wrote:
Hello,
I'm am trying to check for the membership of items in a list and think
I'm missing something.
How is this done in dtml?
List allids: [15,16,17,18]
Check for multiple items in the list:
dtml-in allids prefix=loop
dtml-if expr=loop_item == 17
something
Hello,
I'm am trying to check for the membership of items in a list and think
I'm missing something.
How is this done in dtml?
List allids: [15,16,17,18]
Check for multiple items in the list:
dtml-in allids prefix=loop
dtml-if expr=loop_item == 17
something
dtml-elif expr=loop_item == 17
You should definitely move such *complex* logic into a PythonScript.
DTML is made for generating content but not to implement such
complex logic...and of course the elif part won't work because that's the
semantic of if-elif.
-aj
--On 2. Dezember 2005 05:37:17 -0700 Christopher Rivard
[EMAIL