Yesterday I told about the page hierarchy which contains the pages you include in your portal. Today I will talk about the navigation model. A navigation model is a collection of resources that the users can use to navigate in the portal. We call items in a navigation model resources because that's just what they are. They are more than links. You can for example add portlets, taskflows or content from a content server to your navigation model.
You can also have different navigation models which allows you to use a different model on different pages. If you are creating a large corporate portal and each division has their own sub section of the portal, than you also want the ability for each section to have their own navigation. This all becomes possible in from this release!
As most of the resources in WebCenter, you can manage a navigation model both in runtime as in JDeveloper. I will first explain the navigation model in JDeveloper.
In a WebCenter portal application, the navigation models are stored in the oracle/webcenter/portalapp/navigations folder. By default you will find 2 files:
When you open the default model you will notice that there is only a single element in it being the page hierarchy:
A navigation model has following properties:
When pressing on the Plus sign to add nodes, you will get a list of types of resources that you can add to your navigation model. I will give a brief overview of all these items with the properties.
By adding content item, you can add items from a content server. You first need to create a connection to a content server before you can select the content item. You can select the item by clicking on the browse button in the URL or you can also drag & drop the specific content from the connection to the navigation model.
You can specify the template of the page were the content item will be displayed or to redirect to an URL.
You can also add the complete contents of a folder to a navigation model. This can be used if you have a folder with manuals and you want to show the list of manuals in the navigation. For this you need to add the Content Query. Each file will be listed as a child to the navigation model.
A Content query requires a repository (which is the connection to the content server) and of course the query.
By selecting the Insert folder contents, if your query returns folders than the content of those folders will also be added.
A link is in fact the name for all sorts of resources. When you add a link you need to specify the type of link you want to add:
Instead of manually adding the parameters for the link resources, you can also use the drag & drop technique. You can for example drag a taskflow from the resource palette to the navigation model. This will automatically create a link with the correct properties.
By adding a page query, you add a page hierarchy. You need to specify the path to the xml file containing the page hierarchy. Remember that each level of pages will have its own xml file so you don't need to select the root page hierarchy of the application.
You can also specify the page template and style that need to be used for those pages. By setting to default, it will use the application template.
In a page hierarchy you have the possibility to hide pages. When adding a page query you are allowed to choose whether or not to show the hidden pages in the navigation. You can also only show the hidden pages for example.
By adding a reference to another navigation, you include the content of another navigation model. You have to know that this will only create a reference so the content of the navigation model will be added during runtime.
You can use this to split large navigation models. If you have multiple navigation models and each model uses some same resources, than you can group these together and reference that model from all the others.
By adding a folder you can organize resource in the navigation model.
As an example I will add some content from a content server and a taskflow and show you how it looks in the default template. I will also add a link to Google and embed it into the portal.
This is how the navigation looks when everything has been added:
And this is how it looks in runtime:
This is what you get when clicking on the Folder View link:
As you can see, the taskflow is using the complete space. This is a very nice feature it often happens that you have only a single taskflow or portlet on a page. By adding a link to the portlet or taskflow, you no longer need to create a page and add the taskflow/portlet to it. This can save a lot of time!
This can also be used when you have a page with a small instance of a portlet or taskflow. When you provide a link to such a page, you provide a "Full screen" view of that taskflow/portlet.
The Google page will look like this in our portal:
My browser is set for Dutch so sorry for the language :)
As you see, Google integrates quiet well with our template.
When we click the WebCenterIntro.ptt (this is the content I added from the content server) you will see the properties of the file:
You can of course also manage the navigation models in runtime.
When you create a navigation model in runtime, it is stored in the MDS.
You need to provide a unique name, a description and you can select an existing navigation model to base your model on.
When you edit the navigation model you also have the add button so you can easily add resources to the navigation model.
The elements you see in that menu are defined in the navigation-registry.xml
As you can see, these items are listed in the add menu:
And this is the new folder from the navigation-resources:
See the similarities? This way you can alter the add menu for the runtime managing of navigation models.
In the links folder, you define the items that the users can select when they press the browse button when adding a link.
This is the popup you see during runtime:
And this is the links folder:
This way you can fully customize the way people can manage navigation models in runtime.
Hope you enjoyed this post. If someone has a question, you can leave a comment below.