[Product-Developers] Regisering Viewlets Without a Theme

Nathan Van Gheem vangheem at gmail.com
Wed Oct 1 15:42:23 UTC 2008


Hello,

    I am having issues with trying to register viewlets without a theme.
 From what I can tell, it is designed that you register a viewlet with a
theme product through a skin/layer.  Problem here is that you can only
choose one theme at a time, so if you want a theme installed besides your
viewlet, it will not work.

    If you do not register it with a theme, you can just leave out the layer
declaration for the viewlet.  According to the zope docs, this give the
viewlet the default layer.  Problem here is that the viewlet will show up in
sites that do not even have the product installed.  This didn't make much
sense to me, because I thought that plone would only register the viewlet
for itself once it read the Generic Setup information to place the viewlets.
 I guessing the zope viewlet architecture is superceding the plone
implementation of it here...

    The solution I've come up with thus far is just check if the viewlet is
installed, and only render it if it is.  This is ugly and should be
unnecessary.

    I've been banging my head on the wall about this for some time now.  It
really annoys me that this can't be done easier.  Is this a shortcoming of
viewlets or is there a tricky way to get this to work correctly?

Thanks,

Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20081001/5ce18f58/attachment-0001.html>


More information about the Product-Developers mailing list