Monday, May 26, 2014

Changing the Navigation pattern in web center

The Portal takes a default navigation model to navigate from one page to another , however as a best practice one should never use the default navigation model as it is based on the page hierarchy.



This is because we will not always need the naviagation as per the hierarcy.

Think of a condition where in you will need to load the data from content server.

Even though it will less in hierarcy you will need to be navigated to that page first.

To avoid these kind of situations it is always better to go with the best practices that is to create your own navigation model.

In order to create your navigation model

Go to default-navigation-model.xml and remove the Page Hierarchy.

Now drag and drop the pages that you wanted to navigate in order you want

When you drop select the Page link option and say ok .

So once you complete the dropping the navigation model will look like this.




Go ahead and deploy this page to the integrate weblogic server

You will get a screen like this.

Now you can see that only home is coming in the navigation panel.

This is because we are still using the security model which we have defined in page hierarcy.

So lets login to the page using the default user/pwd of weblogic/welcome1 and see the result




Now after logging in to the page you will find that the two pages have come also but as a separate link , this is not what we have expected so let modify this and try to get the HelloArpit page within HelloWorld






Go back to your navigation model and drag and drop the HelloArpit page to HelloWorld as shown below.





Now validate and redeploy the project and now after logging you should be able to see the correct page details as shown below

No comments: