plone.browserlayer 2.1.2

Browser layer management for Zope 2 applications

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in plone.browserlayer 2.1.2:

  • Add support for calling many times remove in export (ie:even when no corresponding layer is registred, remove option should not throw exception). [toutpt]
Read full changelog
send us
an update
LICENSE TYPE:
GPL (GNU General Public License) 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Plone Foundation
HOMEPAGE:
pypi.python.org
CATEGORY:
ROOT \ Internet \ Plone Extensions
plone.browserlayer is a Plone product that aims to make it easier to register visual components (e.g. views and viewlets) so that they only show up in a Plone site where they have been explicitly installed.

Basic usage

To use this feature, you should:

 declare plone.browserlayer as a dependency, e.g. in setup.py:

 install_requires=[
 'plone.browserlayer',
 ],


 ensure that its ZCML is loaded, e.g. with an include from your own package:

 < include package="plone.browserlayer" / >

 create a layer marker interface unique to your product:

 from zope.interface import Interface
 class IMyProductLayer(Interface):
 """A layer specific to my product
 """

 register this with GenericSetup, in a browserlayer.xml file:

 < layers >
 < layer name="my.product"
 interface="my.product.interfaces.IMyProductLayer" / >
 < /layers >


 register visual components in ZCML for this layer, e.g.:

 < browser:page
 name="my-view"
 for="*"
 layer=".interfaces.IMyProductLayer"
 permission="zope.Public"
 template="my-view.pt"
 / >

Last updated on November 25th, 2011

requirements

#layer management #visual components #Plone #layer #management #visual

Add your review!

SUBMIT