Enrique Perez-3 wrote:
> 
> Hi,
> 
> First, it is probable that I am facing this problem wrongly. My use case 
> is to load some zcml files depending on the gs profile that has been 
> imported in a site: my product has 2 profiles, and depending on which 
> one has been imported, I want to load a different set of directives.
> 

Generally, ZCML cannot depend on persistent GS stuff.

ZCML is executed with Python code and is shared between all Plone sites on
the application server.
GS profile is specific to one site. ZCML cannot possible know what site you
mean.

Instead load ZCML to all sites and use layers and adapters to mark which
code belongs to which Plone site and to differiate in code paths.

http://plone.org/documentation/manual/plone-community-developer-documentation/views/layers/

Hope this helps?

-----
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://plone.293351.n2.nabble.com/persistent-zcml-condition-configured-through-GS-profile-tp5326011p5326468.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