Home
The Toolkit for Online Communities
17097 Community Members, 2 members online, 2398 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Categories as Controlled-Vocabulary Fields

Forum OpenACS Development: Categories as Controlled-Vocabulary Fields

Icon of envelope Request notifications

Collapse
Posted by dave hill on
Controlled-vocabulary fields, when the admin can edit the vocabulary, are pretty similar conceptually to categories.  I'm trying to use that to implement controlled-vocab fields on particular custom data types.  It seems straightforward, except for the first step:  category trees map to objects, not object types.

Has anyone done this yet?  Longer-term, the solution is to expand categories with a category_tree_object_type_map.  However, given serious time constraints, I'm looking for either existing code, or a solution that's quick-but-less-dirty than my first workable idea:    Make a dummy object representative of each target object_type, and map to that.    Kludgy, but then the rest is rather easy.

Any ideas?  Anyone know offhand of showstoppers with the above idea, such as lurking code that assumes something about the mapped object?

Collapse
Posted by Dave Bauer on
Dave,

Interesting. I was thinking of creating dummy objects to map to object_types a couple of days ago for the same reasons. One bit in the categories admin UI shows all packages that are "using" a category tree, but otherwise it should work. I have sucessfully mapped category trees to content folders and checked on that mapping to see what category trees were valid.

The best solution long term is to make object_types objects themselves.

Collapse
Posted by dave hill on
Dave,

Thanks for the heads up.  You're probably right, that making types objects is better, but what type would the first one be?  In other words,  when you type that a type is an object_type, would the object have type type? :)