Guys,
I was trying to create a new visual theme for my application based on Ofbiz. As I was trying to customize the menu part, in CommonMenu.xml, I saw the app menu is defined as : <menu name="CommonAppBarMenu" default-menu-item-name="main" id="app-navigation" type="simple" title="${applicationTitle}&nbsp;" default-selected-style="selected" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="headerItem"> <menu-item name="main" title="${uiLabelMap.CommonMain}"> <condition><not><if-empty field="userLogin"/></not></condition> <link target="main"/> </menu-item> </menu> And in html, it looks like this: <div class="button-bar tab-bar"> <h2>MsLi</h2> <ul> <li> <ul> <li class="active "><a href="/msli/control/main">Main Page</a></li> <li><a href="/msli/control/expensesInputs">Expenses Input</a></li> <li><a href="/msli/control/expensesList">Expenses List</a></li> <li><a href="/msli/control/expensesAnalysis">Expenses Analysis</a></li> </ul> </li> </ul> <br class="clear"/> </div> I'd like to change this html structure to something I want, but I searched all the files and found no place where this html template is defined. The definition in CommonMenu.xml only covers the css style used in this html template. Could anyone who is familiar with this menu template help me out here ? Thanks so much in advance ! |
Hi Lei,
What you're asking for is framework/widget/templates/htmlMenuMacroLibrary.ftl But FYI, I just looked for that file now. I am not really sure about how good it is to change it directly. I think you could look at this to help you create a theme: https://cwiki.apache.org/confluence/display/OFBIZ/Visual+Themes+-+How+to https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+maincss.css+HTML+Element+Collection+Styles Cheers,
Jad El Omeiri
|
Thanks so much Jad for your info !
I searched this file 'framework/widget/templates/htmlMenuMacroLibrary.ftl' in trunk, and it's exactly where I should go and do some customization. However, this file does not exist in versions 12.04 or 13.07, and that confuses me a lot. I'm using Ofbiz 12.04, this file does not exist in the OOTB package at all, then where does the menu html structure come from ? Should I just copy this file from trunk to my 12.04 version and do some customization ? On 12/10/14, Jad El Omeiri <[hidden email]> wrote: > Hi Lei, > > What you're asking for is > framework/widget/templates/htmlMenuMacroLibrary.ftl > > But FYI, I just looked for that file now. I am not really sure about how > good it is to change it directly. > > I think you could look at this to help you create a theme: > https://cwiki.apache.org/confluence/display/OFBIZ/Visual+Themes+-+How+to > https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+maincss.css+HTML+Element+Collection+Styles > > Cheers, > > > > ----- > Jad El Omeiri > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Changing-Ofbiz-s-default-menu-html-template-tp4659527p4659530.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Menu macros are a recent addition. In R12 the HTML is embedded in Java code.
I highly recommend you use a more recent version. Adrian Crum Sandglass Software www.sandglass-software.com On 12/11/2014 3:42 AM, Lei Wu wrote: > Thanks so much Jad for your info ! > I searched this file > 'framework/widget/templates/htmlMenuMacroLibrary.ftl' in trunk, and > it's exactly where I should go and do some customization. However, > this file does not exist in versions 12.04 or 13.07, and that confuses > me a lot. I'm using Ofbiz 12.04, this file does not exist in the OOTB > package at all, then where does the menu html structure come from ? > Should I just copy this file from trunk to my 12.04 version and do > some customization ? > > On 12/10/14, Jad El Omeiri <[hidden email]> wrote: >> Hi Lei, >> >> What you're asking for is >> framework/widget/templates/htmlMenuMacroLibrary.ftl >> >> But FYI, I just looked for that file now. I am not really sure about how >> good it is to change it directly. >> >> I think you could look at this to help you create a theme: >> https://cwiki.apache.org/confluence/display/OFBIZ/Visual+Themes+-+How+to >> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+maincss.css+HTML+Element+Collection+Styles >> >> Cheers, >> >> >> >> ----- >> Jad El Omeiri >> -- >> View this message in context: >> http://ofbiz.135035.n4.nabble.com/Changing-Ofbiz-s-default-menu-html-template-tp4659527p4659530.html >> Sent from the OFBiz - User mailing list archive at Nabble.com. >> |
Thanks Adrian for this info. I will switch to a more recent version,
yet for now I've got to finish my try on R12, could you plz kindly direct me to the Java code where the menu html template is defined ? Or the patch that adds the latest menu macros ? Thanks so much in advance ! On 12/11/14, Adrian Crum <[hidden email]> wrote: > Menu macros are a recent addition. In R12 the HTML is embedded in Java > code. > > I highly recommend you use a more recent version. > > Adrian Crum > Sandglass Software > www.sandglass-software.com > > On 12/11/2014 3:42 AM, Lei Wu wrote: >> Thanks so much Jad for your info ! >> I searched this file >> 'framework/widget/templates/htmlMenuMacroLibrary.ftl' in trunk, and >> it's exactly where I should go and do some customization. However, >> this file does not exist in versions 12.04 or 13.07, and that confuses >> me a lot. I'm using Ofbiz 12.04, this file does not exist in the OOTB >> package at all, then where does the menu html structure come from ? >> Should I just copy this file from trunk to my 12.04 version and do >> some customization ? >> >> On 12/10/14, Jad El Omeiri <[hidden email]> wrote: >>> Hi Lei, >>> >>> What you're asking for is >>> framework/widget/templates/htmlMenuMacroLibrary.ftl >>> >>> But FYI, I just looked for that file now. I am not really sure about how >>> good it is to change it directly. >>> >>> I think you could look at this to help you create a theme: >>> https://cwiki.apache.org/confluence/display/OFBIZ/Visual+Themes+-+How+to >>> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+maincss.css+HTML+Element+Collection+Styles >>> >>> Cheers, >>> >>> >>> >>> ----- >>> Jad El Omeiri >>> -- >>> View this message in context: >>> http://ofbiz.135035.n4.nabble.com/Changing-Ofbiz-s-default-menu-html-template-tp4659527p4659530.html >>> Sent from the OFBiz - User mailing list archive at Nabble.com. >>> > |
Check the commit log for the htmlMenuMacroLibrary.ftl file. The initial
commit was 1517353, and there are bug fixes after that. Adrian Crum Sandglass Software www.sandglass-software.com On 12/11/2014 7:02 AM, Lei Wu wrote: > Thanks Adrian for this info. I will switch to a more recent version, > yet for now I've got to finish my try on R12, could you plz kindly > direct me to the Java code where the menu html template is defined ? > Or the patch that adds the latest menu macros ? Thanks so much in > advance ! > > On 12/11/14, Adrian Crum <[hidden email]> wrote: >> Menu macros are a recent addition. In R12 the HTML is embedded in Java >> code. >> >> I highly recommend you use a more recent version. >> >> Adrian Crum >> Sandglass Software >> www.sandglass-software.com >> >> On 12/11/2014 3:42 AM, Lei Wu wrote: >>> Thanks so much Jad for your info ! >>> I searched this file >>> 'framework/widget/templates/htmlMenuMacroLibrary.ftl' in trunk, and >>> it's exactly where I should go and do some customization. However, >>> this file does not exist in versions 12.04 or 13.07, and that confuses >>> me a lot. I'm using Ofbiz 12.04, this file does not exist in the OOTB >>> package at all, then where does the menu html structure come from ? >>> Should I just copy this file from trunk to my 12.04 version and do >>> some customization ? >>> >>> On 12/10/14, Jad El Omeiri <[hidden email]> wrote: >>>> Hi Lei, >>>> >>>> What you're asking for is >>>> framework/widget/templates/htmlMenuMacroLibrary.ftl >>>> >>>> But FYI, I just looked for that file now. I am not really sure about how >>>> good it is to change it directly. >>>> >>>> I think you could look at this to help you create a theme: >>>> https://cwiki.apache.org/confluence/display/OFBIZ/Visual+Themes+-+How+to >>>> https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+maincss.css+HTML+Element+Collection+Styles >>>> >>>> Cheers, >>>> >>>> >>>> >>>> ----- >>>> Jad El Omeiri >>>> -- >>>> View this message in context: >>>> http://ofbiz.135035.n4.nabble.com/Changing-Ofbiz-s-default-menu-html-template-tp4659527p4659530.html >>>> Sent from the OFBiz - User mailing list archive at Nabble.com. >>>> >> |
Free forum by Nabble | Edit this page |