[Product-Developers] Re: Registering a viewlet for a given content type?
mikko+plone at redinnovation.com
Wed Feb 3 15:46:12 UTC 2010
Shane Graber wrote:
> In looking through the viewlet registration zcml, a person can show a
> viewlet based on if the current context is IContentish or IFolderish.
> However, I have not seen an example of showing a viewlet for only a
> content type. Is this possible through some zcml configuration? I have a
> couple of viewlets that I want to only show up if viewing a Page/Document.
> Do I have to register the viewlet based on IContentish and then within the
> viewlet code itself test whether or not the current content type is ==
All content types should have content type specific marker interfaces. Use
Products.ATContentTypes.interface.IATDocument / check
ATContentTypes source for related interfaces.
mFabrik - Freedom Delivered.
Web site - http://mfabrik.com
Mobile site - http://mfabrik.mobi
Blog - http://blog.mfabrik.com
View this message in context: http://n2.nabble.com/Registering-a-viewlet-for-a-given-content-type-tp4507503p4507855.html
Sent from the Product Developers mailing list archive at Nabble.com.
More information about the Product-Developers