Wednesday May 11, 2011

Modifying Navigation Menus in UCM 11g

UCM Custom Navigation Menus

In UCM 11g, the way the navigation menus are constructed are done differently now.  In the past, this was handled with a navbuilder API in Javascript that allowed for menu choices to be manipulated with commands such as:

navBuilder.addChildNodeTo('ADMINISTRATION', 'item', 'id==FUNCTIONA', 'label==Function A'), 'url=='+httpCgiPath+'?IdcService=FUNCTIONA');

Well, in 11g that method has been deprecated in favor of a new method.   This new method takes advantage of a new data table construct in 11g Idoc Script called Dynamic Data Tables.  These allow you to create tables of data in Idoc Script and dynamically change them as opposed to the static table definitions.  This is useful for data that changes frequently and may be user specific...like the navigation menu.  I won't go into detail on Dynamic Data Tables here, but you can read up more about them in the Oracle Fusion Middleware Developer's Guide for Oracle Universal Content Management 11g Release 1 (11.1.1)

So for the example above, the code would now look like this in the custom component's resource file:

<@dynamicdata CoreMenuItems@>
id, label, linkType, linkData
FUNCTIONA, Function A, cgi, IdcService=FUNCTIONA
<@end@>


<@dynamicdata CoreMenuItemRelationships@>
parentId, id, loadOrder
ADMINISTRATION, FUNCTIONA, 1000
<@end@>

Then you can add some additional information to the menu such as any flags/conditions on when it should be shown and any image to be displayed with it in the Trays view.

<@dynamicdata CoreMenuItemsFlags@>
id, flags
FUNCTIONA, isAdmin
<@end@>


<@dynamicdata CoreMenuItemsImages@>
id, image, imageOpen
FUNCTIONA, ScsPageItem.gif,
<@end@>

To help get you started, I've posted a sample component that gives an example of these methods and includes a readme.html that goes into detail on the different options that are possible.

About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today