This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6b73cf1f0 Improved: Ecommerce - parameterized menu location 
(OFBIZ-13042) (#115)
6b73cf1f0 is described below

commit 6b73cf1f065b9fdfb2b205bb04cad585cad4f737
Author: Pierre Smits <pierre.sm...@somonar.com>
AuthorDate: Fri May 10 20:28:33 2024 +0200

    Improved: Ecommerce - parameterized menu location (OFBIZ-13042) (#115)
    
    * Improved: Ecommerce - move to parameterized menu location
    
    modified: web.xml - add mainMenuLocation
    
    * Improved: Ecommerce - move to parameterized menu location (OFBIZ-13042)
    
    added EcommerceMenus.xml
    
    * Improved: Ecommerce - move to parameterized menu location (OFBIZ-13042)
    
    BlogScreens.xml: changed menu location
    
    * Improved: Ecommerce - move to parameterized menu location (OFBIZ-13042)
    
    ecomseo/web.xml added mainMenuLocation
    
    * Improved: Ecommerce parameterized menu location (OFBIZ-13042)
    
    modified:
    - BlogScreens.xml: corrected menu location - added missing }
    
    removed: BlogMenus.xml
---
 ecommerce/webapp/ecommerce/WEB-INF/web.xml                  | 7 ++++++-
 ecommerce/webapp/ecomseo/WEB-INF/web.xml                    | 5 +++++
 ecommerce/widget/{blog/BlogMenus.xml => EcommerceMenus.xml} | 0
 ecommerce/widget/blog/BlogScreens.xml                       | 4 ++--
 4 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ecommerce/webapp/ecommerce/WEB-INF/web.xml 
b/ecommerce/webapp/ecommerce/WEB-INF/web.xml
index b948d80a9..cf4c5eafd 100644
--- a/ecommerce/webapp/ecommerce/WEB-INF/web.xml
+++ b/ecommerce/webapp/ecommerce/WEB-INF/web.xml
@@ -44,7 +44,12 @@ under the License.
         <param-name>mainDecoratorLocation</param-name>
         
<param-value>component://ecommerce/widget/CommonScreens.xml</param-value>
     </context-param>
-
+    <context-param>
+        <description>The location of the menus file to be used in this webapp; 
referred to as a context variable in screen def XML files.</description>
+        <param-name>mainMenuLocation</param-name>
+        
<param-value>component://ecommerce/widget/EcommerceMenus.xml</param-value>
+    </context-param>
+    
     <filter>
         <display-name>ContextFilter</display-name>
         <filter-name>ContextFilter</filter-name>
diff --git a/ecommerce/webapp/ecomseo/WEB-INF/web.xml 
b/ecommerce/webapp/ecomseo/WEB-INF/web.xml
index 121ffcb64..372054a79 100644
--- a/ecommerce/webapp/ecomseo/WEB-INF/web.xml
+++ b/ecommerce/webapp/ecomseo/WEB-INF/web.xml
@@ -49,6 +49,11 @@ under the License.
         <param-name>defaultPage</param-name>
         <param-value>/main</param-value>
     </context-param>
+    <context-param>
+        <description>The location of the menus file to be used in this webapp; 
referred to as a context variable in screen def XML files.</description>
+        <param-name>mainMenuLocation</param-name>
+        
<param-value>component://ecommerce/widget/EcommerceMenus.xml</param-value>
+    </context-param>
 
     <filter>
         <display-name>ContextFilter</display-name>
diff --git a/ecommerce/widget/blog/BlogMenus.xml 
b/ecommerce/widget/EcommerceMenus.xml
similarity index 100%
rename from ecommerce/widget/blog/BlogMenus.xml
rename to ecommerce/widget/EcommerceMenus.xml
diff --git a/ecommerce/widget/blog/BlogScreens.xml 
b/ecommerce/widget/blog/BlogScreens.xml
index 9dc8a19c8..b12db2f43 100644
--- a/ecommerce/widget/blog/BlogScreens.xml
+++ b/ecommerce/widget/blog/BlogScreens.xml
@@ -115,7 +115,7 @@
                                 </condition>
                                 <widgets>
                                     <container style="card">
-                                        <include-menu name="ViewEdit" 
location="component://ecommerce/widget/blog/BlogMenus.xml"/>
+                                        <include-menu name="ViewEdit" 
location="${parameters.mainMenuLocation}"/>
                                         
<platform-specific><html><html-template 
location="component://ecommerce/template/blog/BlogContentAltLink.ftl"/></html></platform-specific>
                                         <!--<link text="${blog.contentName} 
[${blog.contentId}]" target="ViewBlogArticle" style="blogheader">
                                             <parameter param-name="contentId" 
from-field="blog.contentId"/>
@@ -138,7 +138,7 @@
                                 </condition>
                                 <widgets>
                                     <container style="card-body">
-                                        <include-menu name="ViewEdit" 
location="component://ecommerce/widget/blog/BlogMenus.xml"/>
+                                        <include-menu name="ViewEdit" 
location="${parameters.mainMenuLocation}"/>
                                         <!--<label text="${blog.contentName} 
[${blog.contentId}]" style="blogheader"/>-->
                                         
<platform-specific><html><html-template 
location="component://ecommerce/template/blog/BlogContentAltLink.ftl"/></html></platform-specific>
                                         <!--<link text="${blog.contentName} 
[${blog.contentId}]" target="ViewBlogArticle" style="blogheader">

Reply via email to