diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 51b021e..5ee5444 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -15,6 +15,16 @@ from plone.app.discussion.comment import CommentFactory from zope.component import createObject +class View(BrowserView): + """Comment View + """ + + def __call__(self): + # Redirect from /path/to/object/++conversation++default/123456789 + # to /path/to/object#comment-123456789 + comment_id = aq_parent(self).id + self.request.response.redirect(aq_parent(aq_parent(aq_parent(self))).absolute_url() + '#comment-' + comment_id) + class CommentsViewlet(BrowserView): """Discussion Viewlet """ diff --git a/plone/app/discussion/browser/configure.zcml b/plone/app/discussion/browser/configure.zcml index 561dda7..8cd8647 100644 --- a/plone/app/discussion/browser/configure.zcml +++ b/plone/app/discussion/browser/configure.zcml @@ -18,7 +18,16 @@ permission="zope2.View" /> - + + + + - +