Forum OpenACS Development: Categories Package, support for restricting or allowing multiple category selection

I am looking into the new categories package. I want to be able to specify for a certain category tree, if single or multiple category assignment is allowed. Right now it appears this must be done in the category using application.

My idea is to set a default value of single or multiple for each category tree. When a category tree is mapped to an object such as a package_id, the default can be used or it can be changed (not sure if this is a good idea or not...).

This way the category widget could render correctly to support single or multiple assignment.

So any comments or other suggestions on how to accomplish this?

No comments on how to do this, but I agree that it's a good idea. The default should probably be multiple selections, as it is now.
I found Lars' post on categories for logger: http://www.collaboraid.biz/developer/blog/one-entry?entry%5fid=23770

Apparently he ran into the same problem. I think the place to store this is in the mapping table from trees to objects (package_ids by deafault). But it also might be better to restrict or allow per tree only. That way all objects mapped to the same tree have the same single or multiple ability regardless of which package they are under.

Dave,

Sounds good to me.

It definitely belongs in the object-tree mapping table, and having a default for the tree is sensible.

Updating the form widget to honor the setting should be straight-forward.

/Lars

Ok. I will put this on my todo-list for categories (i'm currently working on extending it's functionality anyways).
Timo,

Thanks. I will actually attempt to implement this for a project I am working on. When I have something, I'll post here so we can compare notes and possibly get it contributed back to the project. I don't mind doing the work.

Also I am going to work on importing the categories for a tree from a CSV file. I'll post again when it works.

I added the parameters to require categorization and allow single/multiple categorizations in a category tree, so please check it out.