On 2 May 2010 14:24, Martin Aspeli <[email protected]> wrote: > On 2 May 2010 20:54, Laurence Rowe <[email protected]> wrote: >> >> A function sounds the right choice here. > > I disagree (in this instance). Whilst I wouldn't say subclassing is > discouraged (e.g. it's useful for overriding stock content type > behaviour), I would say that putting display logic for a portlet into > a method on a content object's class is silly. That display logic > belongs in the portlet renderer class, which is intended precisely for > this kind of use case.
I agree that, as display logic, this does not belong on the content class as a method. I also agree with Wichert that there is no need for adaption here. Hence my support for the original poster's suggestion of encapsulating the logic in a global function (as it will be used in more than one place). It seems by far the simplest solution. Laurence _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
