Special thanks for Maiko Rocha of the WebCenter A-Team for helping me solving this requirement.
First I create a new jspx page based on the global template called Internal.jspx and add a navigation reference to this page in the default-navigation-model.xml.
Now we can create a navigation model which will be used in the internal page. This menu has a link to the home page so the user can go back to the default menu.
Open the global template called pageTemplate_globe.jspx and go the menu part. Here we will change the default navigation model.
from
#{navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}
to
#{navigationContext.navigationModel[ menuSwitcher.menu ] .listModel['startNode=/, includeStartNode=false']}
Where menuSwitcher is a request bean.
To determine what navigation model I need to use I will check the current page and return the right navigation reference.
The request bean
You can also use EL instead of a request bean.
<af:forEach var="node" varStatus="vs"
items="#{navigationContext. navigationModel[
controllerContext. currentViewPort.viewId eq '/oracle/webcenter/portalapp/ pages/Internal.jspx' ?
'/oracle/webcenter/portalapp/ navigations/ navigationModelInternal.xml' :
'/oracle/webcenter/portalapp/ navigations/default- navigation-model.xml'
].listModel['startNode=/, includeStartNode=false']}">
Here some pictures of the home page
After being authenticated, some extra menu links appears
And at last, the internal page with the new navigation model.
Very Nice Post
ReplyDeleteThanks
http://oracledbain.blogspot.com/
How can we change the default node to display when the user hits the application URL ? For eg: From the last screenshot above, OTN should be the default one selected link and its corresponding page will be displayed without the user clicks on the link.
Delete