I've posted
a patch (against oacs-5-2) that accomplishes what we've discussed, I believe:
There are a few funky things about this:
- Trees set to site_wide_p = 't' can also have a context_id set to some package_id (either a subsite or an application), but the context_id is ignored by Categories; site_wide_p supercedes the context_id. This works out OK, but conceptually it's muddy; there isn't a clean, mutually-exclusive set of states for trees using this mechanism of (site_wide_p + context_id). I don't see any reason to try to re-do the whole schema, however; this is kind of a work-around, but it works, so that presumably is good enough, eh?
- The context bar links aren't entirely sensible. Since Categories is a singleton, when a user navigates there from an application mounted in a subsite, there is a link back to that application, but not to the subsite itself. Seems that there are several options for the context bar:
- Leave it as it is.
- Make it: Main Site >> Subsite Name >> Categories >> Package Name >> Category Management (etc)
- Make it: Main Site >> Categories >> Subsite Name >> Package Name >> Category Management (etc)
Anyway, this code appears to work correctly here, but it needs to be dropped into other uses of Categories, so please do so and post any problems. If it works/looks OK, then someone (OCT?) should let me know and I'll commit this.