[Zope-CMF] Re: DTML, RSS customization and my incompetency...

Tres Seaver tseaver at zope.com
Wed Aug 25 10:49:16 EDT 2004


Dmitry S. Makovey wrote:

> On August 24, 2004 12:51 pm, Michael Haubenwallner wrote:
> 
>>Dmitry S. Makovey wrote:
>>
>>>Anybody has any idea what's going on? And can anybody show me right
>>>direction (I don't want to put more logic in itemRSS - I'd like to make
>>>it per-type customizable)?
>>
>>don't do that - just alter itemRSS and switch formating per portal_type
>>you want a different rendering for. this is easy to do, fast and scales
>>well.
> 
> 
> Actually it seems to scale worse than what I was trying to do as it requires 
> modifications to itemRSS every time I introduce new type, unless I'm going to 
> provide some kind of central registry for renderers, which generates some 
> overhead in performace IMO.

Create a non-visible action, say 'rss', for each type you want to 
syndicate.  Then, have your template grab the method for that action an 
render it.  I don't believe the performance overhead is going to be 
significant here, compared to what else you want to do.


Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com



More information about the Zope-CMF mailing list