In regards to this I've got a couple of ideas (limited to navbar for the moment):
1) The simplest approach is to define multiple navbar.tag files (i.e. userpage_navbar.tag, store_navbar.tag) and that way each jsp file can properly incorporate the correct navbar layout they want. Same thing could be done with tiles. 2) Another approach, like you suggested, is make them dynamic based on some configuration. I like this approach but I'm not sure how we would drive it out of the DB. Page_template would be the perfect place but most pages aren't based on page templates at the moment. In fact, store.jsp doesn't look like it pulls any data from the DB. I guess we could build it where it was based on page_type and just have static values from some page types. So maybe, STORE, USER, ADMIN, PERSON_PROFILE? If it was DB driven I envision a navitems table with the following columns: id, page_type, menu_name, menu_item_name, menu_item_url, menu_item_icon. (being to have multiple groups is important to us since we want to have the items split between two dropdown menus) Parent User Story: https://issues.apache.org/jira/browse/RAVE-585 Chris On Thu, Apr 26, 2012 at 8:25 AM, <[email protected]> wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/4880/#review7265 > ----------------------------------------------------------- > > > Thanks for the patch. A couple of issues though: > > 1) This only takes into account the portal pages. Menus on other pages > are rendered differently. What would be the best approach is to have a > single menubar with navigation contributions based on page template and > render out the nav elements dynamically. This approach can then be extended > to allow menu item contributions from other sources. > > 2) This needs a JIRA ticket for us to Apply it :) > > - mfranklin > > > On 2012-04-25 23:47:10, Chris Geer wrote: > > > > ----------------------------------------------------------- > > This is an automatically generated e-mail. To reply, visit: > > https://reviews.apache.org/r/4880/ > > ----------------------------------------------------------- > > > > (Updated 2012-04-25 23:47:10) > > > > > > Review request for rave. > > > > > > Summary > > ------- > > > > I pulled the "menubar" code out of page.jsp and put it into > common/menubar.jsp to support easier customization for users. I added an > optional attribute to the base-layout to support this additional field and > added it to the tile-def for standard pages. > > > > Something similar might be done for profile and store in the future but > they can't use this exact JSP since their menu options differ from normal > pages. > > > > > > Diffs > > ----- > > > > > /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/common/menubar.jsp > PRE-CREATION > > > /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/templates/base_layout.jsp > 1330602 > > > /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp > 1330602 > > /trunk/rave-portal-resources/src/main/webapp/WEB-INF/tiles-defs.xml > 1330602 > > > > Diff: https://reviews.apache.org/r/4880/diff > > > > > > Testing > > ------- > > > > Ran portal and witnessed no problems. > > > > > > Thanks, > > > > Chris > > > > > >
