Override viewlet howto updated.

svn path=/plone.app.discussion/trunk/; revision=51656
This commit is contained in:
Timo Stollenwerk 2011-08-19 07:02:38 +00:00
parent dea6b644b6
commit 0f2c236ae8
1 changed files with 17 additions and 1 deletions

View File

@ -78,7 +78,23 @@ configure.zcml::
comments.py::
...
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from plone.app.discussion.browser.comments import CommentsViewlet as PloneAppDiscussionCommentsViewlet
from plone.app.discussion.browser.comments import CommentForm
class CommentsViewlet(PloneAppDiscussionCommentsViewlet):
form = CommentForm
index = ViewPageTemplateFile('comments.pt')
def get_commenter_home_url(self, username=None):
if username is None:
return None
else:
return "%s/memberhome/%s" % (self.context.portal_url(), username)
comment.pt::