[Zope3-dev] site.zcml (ftesting.zcml) extension

Dominik Huber dominik.huber at projekt01.ch
Mon Apr 25 09:03:40 EDT 2005


We should have an application/framework-level hook within the site.zcml 
that is processed before *-configure.zcml are invoked.

Problem: A framework package 'b.x' registers a dedicated menu 'b_views'. 
A package 'a.x' using 'b.x' should be able to register menu items 
refering 'b_views'. The initialisation will fail because 'a.x' is loaded 
before 'b.x' and therefore  'a.x' cant register any view to 'b_views' 
because the menu does not exists yet.

Proposed solution: package includes named *-app.zcml will be invoked 
before the regular *-configure.zcml package includes (Compare example 
site.zcml below)

Any objections?

Regards,
Dominik


example site.zcml:

<configure xmlns="http://namespaces.zope.org/zope">

 <include files="package-includes/*-meta.zcml" />

 <include package="zope.app" />

 <!-- Provide application or framework specific configurations-->
 <include files="package-includes/*-app.zcml" />

 <!-- Provide package specific configurations-->
 <include files="package-includes/*-configure.zcml" />

 <!-- Provide local overrides of standard configurations-->
 <includeOverrides file="overrides.zcml" />

 <include file="securitypolicy.zcml" />
 <include file="principals.zcml" />

</configure>



More information about the Zope3-dev mailing list