Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

Oracle WebCenter 11g PS3: Working with Navigation Models and Page Hierarchies

Save for later
  • 3 min read
  • 25 Jul 2011

article-image

 

Oracle WebCenter 11g PS3 Administration Cookbook




oracle-webcenter-11g-ps3-working-navigation-models-and-page-hierarchies-img-0 Over 100 advanced recipes to secure, support, manage, and administer Oracle WebCenter 11g with this book and eBook




        Read more about this book      

(For more resources on this subject, see here.)


Creating a navigation model at runtime


Lots of administrators will not have access to JDeveloper, but they will need to manage navigation models. In WebCenter, you can easily create and manage navigation models at runtime.

In this recipe, we will show how you can add navigation models at runtime.

Getting ready


For this recipe, you need a WebCenter Portal application.

How to do it...

  1. Run your portal application.
  2. Log in as an administrator.
  3. Unlock access to the largest independent learning library in Tech for FREE!
    Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
    Renews at £15.99/month. Cancel anytime
  4. Go to the administration page.
  5. Select Navigations from the Resource tab.
  6. Press the Create button.
  7. Specify a name, for example, hr.
  8. Specify a description, for example, Navigation model for HR users.
  9. Leave copy from empty. In this list, you can select an existing navigation model so the newly created model will copy the content from the selected model.
  10. Press the Create button:

    oracle-webcenter-11g-ps3-working-navigation-models-and-page-hierarchies-img-1


The navigation model is now created and you can add components to it.

How it works...


When you add a navigation model at runtime, an XML file will be generated in the background. The navigation model will be stored in the MDS. You can request the path to the actual xml file by selecting Edit properties from the Edit menu when you select a navigation model. In the properties window, you will find a field called Metadata file. This is the complete directory to the actual XML file.

There's more...


Even at runtime, you can modify the actual XML representation of the navigation model. This allows you to be completely flexible. Not everything is possible at runtime, but when you know what XML to add, you can do so by modifying the XML of the navigation model. This can be done by selecting Edit Source from the Edit menu. This way you will get the same XML representation of a navigation model as in JDevleoper.

Adding a folder to a navigation model


A folder is the simplest resource you can add to your navigation model. It does not link to a specific resource. A folder is only intended to organize your navigation model in a logical way.

In this recipe, we will add a folder for the HR resources.

Getting ready


We will add the folder to the default navigation model so you only need the default WebCenter Portal application for this recipe.

How to do it...

  1. Open default-navigation-mode.xml from Web Content/oracle/Webcenter/portalapp/navigations.
  2. Press the Add button and select Folder from the context menu.
  3. Specify an id for the folder. The id should be unique for each resource over the navigation model.
  4. Specify an expression language value for the Visible attribute.

How it works...


Adding a folder to a navigation model will add a folder tag to the XML with the metadata specified:

<folder visible="#{true}" id="hr">
<attributes>
<attribute isKey="false"
value="folder" attributeId="Title"/>
</attributes>
<contents/>
</folder>




The folder tag has a contents tag as a child. This means that when you add a resource to a folder, these will be added as a child to the contents tag.

There's more...


You can also add a folder at runtime to a navigation model. This is done by selecting your navigation model and selecting Edit from the Edit menu. From the Add menu, you can select Folder. You are able to add the id, description, visible attribute and iconUrl.