[Product-Developers] Stuck overriding a stock Ploine viewlet...

Gilles Lenfant gilles.lenfant at alterway.fr
Thu Feb 9 19:31:10 UTC 2012


Le 9 février 2012 16:54, Raphael Ritz <raphael.ritz at gmail.com> a écrit :

> On 2/8/12 7:05 PM, Gilles Lenfant wrote:
>
>> Hi,
>>
>> Sorry for the disturbance, but I'm actually stuck overriding a standard
>> viewlet of Plone (4.1): The "plone.links.RSS" that goes in the HTML head.
>>
>>
> [..]
>
>
>
>> I'm stuck finding why this does not work as expected (the original
>> viewlet is rendered in place of my custom viewlet). Any help is welcome.
>> And so many thanks by advance for any pointer.
>>
>
> Hi Gilles,
>
> IIRC http://pypi.python.org/pypi/**collective.blog.feeds<http://pypi.python.org/pypi/collective.blog.feeds>does something
> similar. Maybe it helps to have an example (or maybe it's broken for
> Pone 4.1 as well?)
>

Hi Raphael,

collective.blog.feeds registers a viewlet with a *new* name
(collective.blog.feeds.feedsviewlet) in
plone.app.layout.viewlets.interfaces.IHtmlHeadLinks with manager no layer
condition (so IDefaultBrowserLayer rules). It has no viewlets.xml so the
new viewlet is automatically added at top of the plone.htmlhead manager.

In my case, I need to replace the stock Plone viewlet class and name by my
own.

I can't understand because I do exactly the same way I did for overriding
stock Plone 3.3 viewlets and it does not work (actually Plone 4.1). Is it a
bug, a new feature, or something else that's not documented. Yet I read
carefully the new plone developer manual that's supposed to be Plone 4.1
ready http://collective-docs.readthedocs.org/en/latest/views/viewlets.html

I'll make a good old monkey patch to the standard RSS viewlet today, and
find time to make a minimal product with this use case, and file a new
issue to Plone if this is confirmed.

Best...
-- 
Gilles


>
> Raphael
>
>
>> --
>> Gilles Lenfant
>>
>>
>>
>> ______________________________**_________________
>> Product-Developers mailing list
>> Product-Developers at lists.**plone.org <Product-Developers at lists.plone.org>
>> https://lists.plone.org/**mailman/listinfo/plone-**product-developers<https://lists.plone.org/mailman/listinfo/plone-product-developers>
>>
>
>
> ______________________________**_________________
> Product-Developers mailing list
> Product-Developers at lists.**plone.org <Product-Developers at lists.plone.org>
> https://lists.plone.org/**mailman/listinfo/plone-**product-developers<https://lists.plone.org/mailman/listinfo/plone-product-developers>
>



-- 
-- 
Gilles LENFANT
Ingénieur avant-vente - Architecte senior
ALTER WAY SOLUTIONS
T : 01 78 15 24 00
F : 01 46 02 44 04

Téléchargez notre nouveau livre blanc "Python, le développement autrement"
http://www.alterway.fr/publications/python-le-developpement-autrement

1 rue Royal, Bat. D
227, les Bureaux de la Colinne
92210 Saint Cloud
http://www.alterway.fr/solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20120209/a13c62ca/attachment-0001.html>


More information about the Product-Developers mailing list