Forums / Developer / Choosing elements of a specific hierarchy?

Choosing elements of a specific hierarchy?

Author Message

Gabriel Ambuehl

Sunday 13 April 2003 4:20:50 am

I'd like to do something like the following:

Option_container
option_instance_1
option_instance_2
option_instance_3

(Basically a custom new class that holds options whereas all options are contained in option_container).

Now I'd like to have a type that is like enum but always lets the user chose the elements stored belov option_container.

Enum doesn't cut it as I need to have the same options for different classes which would need to have the options reentered all the time (additionally, I need to store some more data per option than just a name).

Visit http://triligon.org

Peter Bailey

Monday 14 April 2003 7:01:44 am

If you're up for it, I'm quite certain you can create your own datatypes.

Go to /kerner/classes/datatypes/ and you'll see folders for all the datatypes, including enum.

See the following tutorial about making your own
http://ez.no/sdk/tutorials/view/datatypes

Jan Borsodi

Monday 14 April 2003 7:18:02 am

You can do this with a custom module and a new datatype.
The module would handle the creation of the option lists and the datatype would refer to one your option items making it easy to use in multiple classes.

I would recommend looking at either the option or enum datatype for example code.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Gabriel Ambuehl

Monday 14 April 2003 7:52:27 am

I was kinda hoping I could do without implementing a new datatype but hey, I gotta try it at one time (just not today ;-).

I don't think I need a module for it though as I simply want it to display all the 1st level children of a given node.

I've eben been thinking of just abusing the multi category feature for linkage (to link employes to projects for one).

Visit http://triligon.org