Re: selection list confusion ...
Re using a DTML method as the value for a property of type "selection", I apologize for not reading AlexR's How-To (http://www.zope.org/Members/AlexR/SelectionLists) in its entirety. Alex gives an example of building up the list from scratch. In my case, the list is a property of my globals folder which lives under the root so the DTML method should be simply: <dtml-with globals><dtml-return Choices></dtml-with> rather than <dtml-with globals><dtml-var Choices></dtml-with> as the latter gives a string rather than a python list. I'm still looking for a way of referencing globals.Choices directly without having to write this root-level method ... Cheers, Darran.
Hi, Darran If you are in a DTML Method, <dtml-in "globals.Choices"> should work. If you are in a DTML Document, you probably have to do something like: <dtml-in "PARENTS[-1].globals.Choices"> If you are doing this within a ZClass, you can put Choices on a PropertySheet, then refer to it as <dtml-in Choices> Regards, -- Jim Washington Darran Edmundson wrote:
Re using a DTML method as the value for a property of type "selection", I apologize for not reading AlexR's How-To (http://www.zope.org/Members/AlexR/SelectionLists) in its entirety. Alex gives an example of building up the list from scratch. In my case, the list is a property of my globals folder which lives under the root so the DTML method should be simply: <dtml-with globals><dtml-return Choices></dtml-with> rather than <dtml-with globals><dtml-var Choices></dtml-with> as the latter gives a string rather than a python list.
I'm still looking for a way of referencing globals.Choices directly without having to write this root-level method ...
Cheers, Darran.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Darran Edmundson -
Jim Washington