How to define selection list elements
Hi, I am creating an object in Zope. I have defined various different values for the object such as url (string) title (string) description (text) But now I want to create a drop down object that has predefined values so the users can select one of the options. There is a property called selection list, and I was unable to find any documentation in how to use it. I tried adding a space seperated values, but it did not work. In the Zope content manager guide on page 42 (pdf version) figure 40 it does not talk about the selection lists. Any help will be appretitated.. Adonis
technews@egsx.com wrote There is a property called selection list, and I was unable to find any documentation in how to use it. I tried adding a space seperated values, but it did not work. In the Zope content manager guide on page 42 (pdf version) figure 40 it does not talk about the selection lists.
easy way: create a property of type 'tokens', specify a bunch of strings, seperated by spaces (e.g. "abc def ghi jkl"). Say you call this token property 'option_choices'. Now define a property, type selection, with a value of 'option_choices'. Voila. the slightly trickier way: make an object that returns a list of strings. Set the value of the new selection property to the name of this object. Done. Anthony
participants (2)
-
Anthony Baxter -
technews@egsx.com