[Zope-CMF] tree view for a set of CMFTopics

Tres Seaver tseaver@zope.com
Thu, 15 Nov 2001 08:50:08 -0500


Lucas Hofman wrote:

> Has anybody written a skin/method to display a hierarchy of CMFTopics tlike this:
> 
> - topic1 (130)        + subtopic1 (13)
>                 subtopic2 (2)
>                 + subtopic3 (79)
>                 + subtopic4 (80)
> + topic2 (200)
> + topic3 (23)
> 
> where the numbers between  the brackets are the number of occurences. 
> Clicking on those should gives the list of items the topic matches.
> Clicking on the minus or plus sign should contract or expand the topic. i.e. 
> clicking on the plus sign for subtopic 3 should result in something like:
> 
> - topic1 (130)        - subtopic3 (79) + subsubtopic1 (40)
>                                 + subsubtopic2 (50) 
>                 + subtopic1 (13)
>                 + subtopic2 (2)
>                 + subtopic4 (80)
> 
> The idea is that a reader can quikly browse down, sideways or up in topic 
> hierachy. When the numbers between brackets get low enough, he/she can choose 
> to view the list of items.

Without significant help from either "topic indexes" or
some kind of caching, such a page will be hideously expensive
to render:  topics have no way of knowing how many matching items
they have without asking the catalog, so you end up making a catalog
query for each topic exposed by the tree.

The fishbowl proposal for topic indexes:

   http://dev.zope.org/Wikis/DevSite/Proposals/TopicIndexes

The initial implementation in CVS (on a branch until after
2.5 releases):

 
<http://cvs.zope.org/Products/PluginIndexes/TopicIndex/?only_with_tag=ajung-topicindex>

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com