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

Gitte Wange gitte@mmmanager.org
Mon, 18 Jun 2001 19:18:52 +0200


On Monday 18 June 2001 19:12, you wrote:
> 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.

I don't get this (or maybe I get it "to well")

When you have created a topic you then need to find it in the ZMI ??
That doesn't sound very "contentish" to me. If my users create a new topic I 
need to search for it ?

>
> > 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.

Sorry .... don't get this. Do you mind cutting it out for me ?

> > 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.

Is there an API for topics that I have missed ?

Regards,
-- 
Gitte Wange Jensen

Sys Admin, Developer and a lot more
MMmanager.org Aps, Denmark

Phone: +45 29 72 79 72
Email: gitte@mmmanager.org
Web: www.mmmanager.org

Quote of the day:
Never write a workflow system in DTML
	
	- Chris Petrelli, Zope tutorial at IPC8, 2000/01/24 (We tried this once, and 
boy was he was right)