[Zope-CMF] How to select"published" documents with discussions
"enabled."
Troy Farrell
troy@entheossoft.com
Mon, 17 Mar 2003 16:55:01 -0600
Welcome new zope user.
When you run these queries against the portal_catalog, you can only
query variables that are stored in the catalog. In CMFDefault (I'm not
a plone user), there are no "discussion" related variables cataloged.
You would need each item to have a function that verified that the item
was discussable by calling the discussion tool's isDiscussionAllowedFor:
context.portal_discussion.isDiscussionAllowedFor(item)
Troy
Forum Administrator wrote:
> Hello,
>
> I am new to the zope/cmf/plone world, so please bear with me.
>
> I am trying to figure out how to select only those documents
> that are (a) in published state and (b) have discussions enabled.
>
> I looked at the News templet and I see:
> tal:define="results Python:container.portal_catalog(meta_type='News
> Item',sort_on='created',sort_order='reverse',review_state='published');
>
> I have changed meta_type to Document and am able to list documents in
> published state, but not sure the syntax to
> test for the isDiscussionAllowedFor (or a similar) property
>
> Thanks much for any pointers, a code snippet, or just a link to a
> relevant page somewhere.
>
> TIA,
>
> Nowar.org Forum Admin