As a comment on the tutorial about the navigation model i got the question if it's possible to use multiple navigation models in a custom template.
WebCenter only supports a single default navigation model but you can access any navigation model from your template.
This post gives a short example how you can use multiple navigation models in WebCenter 11g PS3.
You can download the example project to take a closer look at the details.
The example contains an additional navigation model that contains links to search engines. I will modify the default template by adding the second navigation model.
I also added the additional template in the pagetemplates folder and is called multipleNMTemplate.
The most important lines are the ones between 99 and 113. These lines are responsible for displaying the navigation model.
First of all we will display the default navigation model:
As you can see we can reference the default navigation model by calling navigationContext.currentModel. Don't think that this call will refer to the default-navigation-model.xml. In our case it does, but this is not always the case. If you would select the searchEngines as the default navigation model than this call will reference the searchEngines navigation model.
In the second part we will display the searchEngines navigation model by using a reference to its path:
As you can see, we can reference whatever navigation model we like by calling the navigationContext.navigationModel['pathToNavModel'].
That's it. Nothing more to it.
Now make the template available as a portal resource by right clicking on it in the Application Browser and select Create Portal Resource
Run the Portal project. Login with an administrator and go to the configuration so you can select the default template:
When you return to the portal you will notice that both the navigation models are rendered:
As you can see, this is not realy that difficult. You only need to know how to get the second navigation model by calling navigationContext.navigationModel. That's all.