Forum OpenACS Development: Re: Looking for some advice re use of Categories.

Posted by Brian Fenton on
Well, I found the basic design stuff at so that has given me a start.

Let me ask my question anyway, as somebody may be able to advise me on the best approach.

Looking at the data model, I can see all Trees are Categories but is every Category also a Tree? The data model certainly seems to say "NO" but the reason I'm confused is that /categories/cadmin/tree-map says "Map this subtree" when it's clearly linking to a Category, so that got me thinking that maybe Categories are also Trees. Maybe it's just a terminology thing? My natural thing to do is to take the data model as Truth but I'd love some confirmation of this.

If I have a simple Tree called Sport with sub-categories "soccer" "rugby" and "golf" (I only need to allow 1 sub-level in this particular example). Now I understand that "soccer" "rugby" and "golf" are all Categories but are they also Sub-Trees?

The reason I ask this is that I want to be able to allow various objects to map to these sub-categories. For example, I may want a Person to select which sub-categories they are interested in under the "Sport" category. I might also want a different type of object (e.g.a Ticket) to map to a different set of sub-categories of another Tree. Now, looking at the data model it appears that either CATEGORY_OBJECT_MAP or CATEGORY_TREE_MAP would be a perfect match for my needs. Can anyone explain when you would use either of those 2 tables? I guess the answer to my first question will answer that one too. I see there is some interesting looking "Widget" stuff on CATEGORY_TREE_MAP - does anyone have any more info on how to best use that?

many thanks for any help