Andreas Hartmann wrote:
[EMAIL PROTECTED] wrote:

Author: thorsten
Date: Mon Nov  7 06:39:02 2005
New Revision: 331273

URL: http://svn.apache.org/viewcvs?rev=331273&view=rev
Log:
Added a fallback for module specific menu generation. Now you can override the menus provided by the modules. e.g. If you want to override the menu provided by the xhtml module, just create a file in pub-id/conf/menus/xhtml.xsp and provide your own menu implementation for the module.

Modified:
    lenya/trunk/src/webapp/global-sitemap.xmap

Modified: lenya/trunk/src/webapp/global-sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/global-sitemap.xmap?rev=331273&r1=331272&r2=331273&view=diff ==============================================================================
--- lenya/trunk/src/webapp/global-sitemap.xmap (original)
+++ lenya/trunk/src/webapp/global-sitemap.xmap Mon Nov  7 06:39:02 2005
@@ -237,6 +237,10 @@
       <!-- menu-xml/module/{module-id}/{area}.xml -->
       <map:match pattern="menu-xml/module/*/*.xml">
         <map:select type="resource-exists">
+          <map:when test="fallback://config/menus/{2}.xsp">
+ <map:generate type="serverpages" src="fallback://config/menus/{2}.xsp"/>
+            <map:serialize type="xml"/>
+          </map:when>


IMO the fallback should be used in the module's menus.xmap, when the XSP
is loaded. We shouldn't add XSP locations to the contract.

WDYT?

+1

Then I would suggest to fallback enable the menus.xmap:

Index: src/webapp/global-sitemap.xmap
===================================================================
--- src/webapp/global-sitemap.xmap      (revision 344071)
+++ src/webapp/global-sitemap.xmap      (working copy)
@@ -241,8 +241,8 @@
<map:generate type="serverpages" src="fallback://config/menus/{2}.xsp"/>
             <map:serialize type="xml"/>
           </map:when>
-          <map:when test="lenya/modules/{2}/menus.xmap">
- <map:mount uri-prefix="menu-xml/module/{1}/" src="lenya/modules/{2}/menus.xmap" check-reload="true" reload-method="synchron"/>
+          <map:when test="fallback://lenya/modules/{2}/menus.xmap">
+ <map:mount uri-prefix="menu-xml/module/{1}/" src="fallback://lenya/modules/{2}/menus.xmap" check-reload="true" reload-method="synchron"/>
           </map:when>
           <map:otherwise>
<map:generate type="serverpages" src="lenya/content/menus/live.xsp"/>


- Felix


-- Andreas


--
Felix Röthenbacher                  [EMAIL PROTECTED]
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to