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
> certain
> 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 ==
> "Document"?
> 

http://www.starzel.de/blog/how-to-get-a-different-look-for-some-pages-of-a-plone-site

All content types should have content type specific marker interfaces. Use
Products.ATContentTypes.interface.IATDocument / check
ATContentTypes source for related interfaces.





-----
Mikko Ohtamaa
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.

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to