We have a need to store and maintain a topic hierarchy in a WCM project. The purpose of the hierarchy is to categorize "stock answers" (ie FAQs) and to provide clients the ability to find answers by drilling down through the topic tree.

The hierarchy should be maintained in Alfresco, and update access should be limited to the maintainers. We need to be able to place stock answer documents (WCM XML docs) into the topic hierarchy on the document's web form. Each topic should have a name and an integer "id". We want to keep the id values from our current stock anwer system.

The current hierarchy has 263 topics and goes 4 levels deep (not including the root/top level).

Our first cut at this was to create a JSP that has the hierarchy hard-coded, and that generates a drop-down list in the web form. This works OK (even though the drop-down list is long). However, this does not allow our topic maintainers to update the hierarchy easily.

The first refinement was to model the hierarchy data in XML, with the aim of using a JSP to read the hierarchy and form the drop-down list on the web form. An XML topic tree with arbitrary depth proved impossible for Xforms to handle (java stack overflow due to infinte recursion). We now have an XML doc with up to 6 levels that can accomodate our current data set. However, Firefox was unable to render the form fully, and while MSIE did display the form (after about 5 minutes), the resulting form was unwieldy and pretty much impossible to use. It was not clear at all which elements each plus & minus sign belonged to, so it was almost impossible to know which control to use to add children to a topic.

So we are back to square one, still looking for a workable solution. One idea has been to use Alfresco's categories. This would at least give us a built in interface for maintaining the hierarchy. One disadvantage - only one category hierarchy per Alfresco instance. We could work around this by dividing up the category space ourselves. A bigger disadvantage is that the categories are maintained through the Admin Console, so presumably anyone maintaining categories would need "super user" privileges. We don't feel comfortable with that situation.

Another idea we've had, somewhat kludgey, is to use a directory hierarchy within the web project to represent the topic tree. This would give us a hierarchy with topic names, but not IDs. Is it possible to have Alfresco automatically create an XML file in a directory when the directory is created?

Anyway, the basic question is how best to do what we want to do?

  • No labels