This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » Choosing elements of a specific...
expandshrink

Choosing elements of a specific hierarchy?

Choosing elements of a specific hierarchy?

Sunday 13 April 2003 1:20:50 pm - 3 replies

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).

Monday 14 April 2003 4:01:44 pm

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

Monday 14 April 2003 4:18:02 pm

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.

Monday 14 April 2003 4:52:27 pm

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

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).

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from