[Zope-CMF] Trying to list portal topics - but finds nothing

Tres Seaver tseaver@palladion.com
Mon, 18 Jun 2001 13:12:40 -0400 (EDT)


On Mon, 18 Jun 2001, Gitte Wange wrote:

> Hello,
> 
> I have been trying to get a list of all Portal Topics in my
> portal ... but failed :-)
> 
> This is a snip of my code:
>  <tr class="&dtml-AuthClass;">
>   <td class="ActionTitle">
> <dtml-in "portal_catalog.searchResults( meta_type='Portal Topic'
> 					)">
> something<br>
> </dtml-in>
>   </td>
>  </tr>
> 
> It never prints 'something' ...
> 
> I have looked in the Portal Topic code and yes - the meta type
> is Portal Topic.

Topics, like folders, aren't "content", so they don't get
catalogued (by default).  Try using the "Find" tab of the
'portal_catalog' (ZMI) to find topics, and then repeat your
query;  they will show up.
 
> Isn't there anyway to:
>
> a) list portal topics in the menu

You could tweak the skin methods used to edit the topic
properties to get the topic indexed when the properties are set;
your query will then work.

> b) for each portal topic generate a list of all the docs etc.
>    in the topic

The topic objects have a 'queryCatalog' method which does that
for you.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org