I was working on the Apache ofbiz(17.12.07) since last 1 month, I have a custom UI requirement for a client. I want to display a side-bar(screenshot of sibe-bar attached below) in all the ofbiz modules. I have created a plugin called HOME in ofbiz. this HOME plugin contains a header,side-bar,container,footer.
I have created a .ftl file for this. my requirement is to display the same header,sidebar,footer in all the module pages and the container will change according to the module content.
If the modules are ftl files then I could modify the UI but they are xml files not the ftl. clicking on the modules in the sidebar will take you to the respective module.
example: when I click on Asset maintenance in home page. we'll direct to Asset maintenance page. the container which is of grey color is the xml file as shown below.
container xml:
<screen name="FindScreenDecorator">
<section>
<widgets>
<section>
<condition>
<if-empty field="titleProperty"/>
</condition>
<widgets>
<container style="page-title"><label text="${title}"></label>
</container>
</widgets>
<fail-widgets>
<container style="page-title"><label
text="${uiLabelMap[titleProperty]}"></label></container>
</fail-widgets>
</section>
<decorator-section-include name="menu-bar"/>
<container style="clear"/>
<screenlet id="searchOptions" name="findScreenlet" collapsible="true"
title="${uiLabelMap.CommonSearchOptions}">
<container id="search-options">
<decorator-section-include name="search-options" />
</container>
</screenlet>
<screenlet padded="false">
<label style="h3" text="${uiLabelMap.CommonSearchResults}"/>
<container id="search-results">
<decorator-section-include name="search-results"/>
</container>
</screenlet>
</widgets>
</section>
</screen>`
home page screenshot: home_page_template
Asset maintenance module Ui screenshot: Asset_maint_Page
layout of Ui: layout
code for home page:
<div class="screenlet-body">
<#if !userLogin?has_content>
<div>${uiLabelMap.WebtoolsForSomethingInteresting}.</div>
<br />
<div>${uiLabelMap.WebtoolsNoteAntRunInstall}</div>
<br />
<div><a href="<@ofbizUrl>checkLogin</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></div>
</#if>
<#if userLogin?has_content>
<ul class="webToolList" id="home">
<li><a href="/manufacturing/control/main?externalLoginKey=ELf8650276-c0c1-4952-9936-fd87e090beff"><h2 id="production">${uiLabelMap.HOMEProduction}</h2></a></li>
<li><a href="/facility/control/main?externalLoginKey=ELfccd14d0-0b7b-4ded-844d-d8a9b950187c"><h2 id="inv">${uiLabelMap.HOMEInventoryManagement}</h2></a></li>
<li><a href="/assetmaint/control/main?externalLoginKey=ELfccd14d0-0b7b-4ded-844d-d8a9b950187c"><h2 id="asset">${uiLabelMap.HOMEAssetMaintenance}</h2></a></li>
<li><a href="/ordermgr/control/main?externalLoginKey=ELe412b3d4-a7a5-42a8-bc8c-9be077c664b9"><h2 id="order">${uiLabelMap.HOMEOrder}</h2></a></li>
<li><a href="/partymgr/control/main?externalLoginKey=EL154c28ab-c21d-4004-8ab4-cc18d49bbe65"><h2 id="users">${uiLabelMap.HOMEUsers}</h2></a></li>
<li><a href="/catalog/control/main?externalLoginKey=ELfccd14d0-0b7b-4ded-844d-d8a9b950187c"><h2 id="prodcatalog">${uiLabelMap.HOMEProductCatalog}</h2></a></li>
</ul>
</#if>
</div>