Forum OpenACS Development: Looking for some advice re use of Categories.
I have a longer question about Categories in OpenACS but first I'll ask the shorter question: I'm having trouble finding documentation for Categories - searching under the old Documentation or the XoWiki stuff gave me nothing.
Does anybody know where I might find some?
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
So trees are not categories. However a branch of a tree comprised of some categories is sometimes referred to as a subtree with one category as the root, but this does not make it a tree.
Once I had that clarified it made my 2nd question very straight forward to answer - I used CATEGORY_OBJECT_MAP to map my objects to multiple categories. There is a beautiful API there for doing this. Worked very nicely - I enjoyed my introduction to categories.
Hope this is useful to somebody else someday.
a few days ago i did a little research
notif pkg is still cluttered on how to use it
1. this one is a full link only!