From ad5cca6454f01bbf18755ab4aa5eabeb5c7aec1b Mon Sep 17 00:00:00 2001 From: Gaudenz Steinlin Date: Tue, 29 May 2012 11:27:59 +0200 Subject: [PATCH] Hide Conversation objects from breadcrumb navigation The breadcrumbs navigation is also used in the search results view. This lead to Conversation objects showing up if 'Discussion Items' are searchable. --- CHANGES.txt | 5 +++++ plone/app/discussion/conversation.py | 4 +++- setup.py | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index bb27a70..f0b360f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,11 @@ Changelog - Fix excessive JS comment deletion. [gaudenz] +- Hide Conversation objects from breadcrumb navigation. The breadcrumbs + navigation is also used in the search results view. This lead to Conversation + objects showing up if 'Discussion Items' are searchable. + [gaudenz] + - No longer depend on zope.app packages. [hannosch] diff --git a/plone/app/discussion/conversation.py b/plone/app/discussion/conversation.py index e9f5a29..88caa19 100644 --- a/plone/app/discussion/conversation.py +++ b/plone/app/discussion/conversation.py @@ -42,6 +42,8 @@ from BTrees.OIBTree import OIBTree from BTrees.LOBTree import LOBTree from BTrees.LLBTree import LLSet +from Products.CMFPlone.interfaces import IHideFromBreadcrumbs + from plone.app.discussion.interfaces import IConversation from plone.app.discussion.interfaces import IReplies from plone.app.discussion.comment import Comment @@ -56,7 +58,7 @@ class Conversation(Traversable, Persistent, Explicit): comment lookup. """ - implements(IConversation) + implements(IConversation, IHideFromBreadcrumbs) __allow_access_to_unprotected_subobjects__ = True diff --git a/setup.py b/setup.py index d9a7b91..037a51c 100644 --- a/setup.py +++ b/setup.py @@ -12,6 +12,7 @@ install_requires = [ 'plone.indexer', 'plone.registry', 'plone.z3cform', + 'Products.CMFPlone', 'ZODB3', 'zope.interface', 'zope.component',