On 06/12/13 11:39, Torsten Kühnel wrote:
So i end up with a viewlet which has control over how to render the
actually discussion list, either discussion style or guestbook style by a
setting in the document.
The actual decision on what to render is in the new comments.pt which has
You could move that decision into the viewlet's python code. Make the
.render() call return either the original discussion template via
super(...).render() or return your custom stuff via
ViewPageTemplate('your template'). That way you only need your custom
template code.
two parts, one a copy from the dicussion comments.pt, and one adapted to
guestbook style comments with title, img tag and such. This way the
guestbook can by styled independently from discussions. This looks
somewhat ugly to me to have that in one pagetemplate, but i don't know
how to make plone use the orginal template from app.discussion or my one.
See above.
Then i have a problem with subclassing and decorated functions, as it
looks the decorator calls the base class and not my derived one, thats
bad and i am new to decorators, too.
Just set the decorators directly on your custom code.
:*CU#
--
Guido Stevens | +31.43.3618933 | http://cosent.nl
s o c i a l k n o w l e d g e t e c h n o l o g y
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers