Conditionally hide the Standard Search and Standard Check-in links in Oracle UCM 11g

Before I begin, let me point out – this tip is specific to 11g. For an explanation of how to do this sort of thing in 10g, click here.

If you’ve read Kyle’s post on modifying the navigation menus in UCM 11g, you have a pretty good understanding of how to add your own custom links to the menu interface in UCM 11g using the new Dynamic Data tables. But what if your goal is to conditionally hide the default Standard Search and Standard Check-in links? It could be because you have created your own profiles to handle the search and check-in experience, and while you don’t want the clutter and possible confusion the default links could introduce to your users, you’d like to keep them around for admins. I’ll explain how this can be done by creating a simple Custom Component that restricts the Standard Search and Standard Check-in menu links to admins. I’ve created an example custom component called ‘CustomMenuLinks’ that does this, available for download at the bottom of this post.

If you look at the std_nav.idoc file you’ll see your standard links in the CoreMenuItems data table. The Standard Search link can be found in the linkData of the SEARCH item, and for Standard Check-in, the NEW_CHECK_IN item.

Scrolling down further in std_nav.idoc, we can see that the flags controlling visibility of menu items are configured in the CoreMenuItemsFlags data table.  To restrict a menu item to admins only, it’s as easy as adding a row with an id and flags pair. In fact, there are other flag values you can apply to menu items depending on the specific behavior you want – check the documentation for all the possibilities. At first glance it seems that adding rows for SEARCH and NEW_CHECK_IN with the corresponding flags value ‘isAdmin’ will do the job, however it is a little bit trickier than that.

CoreMenuItems SEARCH and NEW_CHECK_IN are actually more than just links. Scroll back up to the CoreMenuItemRelationships data table and you will find them referenced as parent items of the MY_PERSONAL_SEARCHES_LIST and MY_PERSONAL_CHECKINS_LIST items, respectively. These “lists” are in fact placeholders for your profile-specific search and check-in links. Setting their parents only accessible to admins would also restrict all profile-specific search and check-in links to admins, which isn’t what we want.

What you can do is create a simple custom component that makes the following changes to CoreMenuItems, CoreMenuItemRelationships and CoreMenuItemsFlags data tables:

  • Add new items for standard search and check-in, having their own labels but linkType and linkData use the values specified for SEARCH and NEW_CHECK_IN.
  •  Update the SEARCH and NEW_CHECK_IN items to leave their linkType and linkData values blank as the actual links themselves will be served by the new items. (You’ll need to specify mergeBlanks to ensure your empty values will be merged into the table)
  • In the CoreMenuItemRelationships table, configure SEARCH and NEW_CHECK_IN as parents of your new standard search and check-in links.
  • Finally, you can now add flags for your standard search and check-in links to the CoreMenuItemsFlags data table to restrict them to admins only.

To download this example custom component, click here. It consists of the below (that’s it!):

<@dynamicdata CoreMenuItems@>
<?commatable mergeKey="id" mergeBlanks?>
id,                                label,                                              linkType,   linkData
SEARCH,                            wwSearch,                                           ,
STANDARD_SEARCH,                   Standard Search,                                          cgi,        IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=STANDARD_QUERY_PAGE
NEW_CHECK_IN,                      wwNewCheckIn,                                       ,
STANDARD_CHECK_IN,	Standard Check-In,	cgi,	IdcService=CHECKIN_NEW_FORM
<@end@>
<@dynamicdata CoreMenuItemRelationships@>
<?commatable mergeKey="id"?>
parentId,                          id,                                loadOrder
SEARCH,                            STANDARD_SEARCH,                   1000
NEW_CHECK_IN,	STANDARD_CHECK_IN,	1000
<@end@>
<@dynamicdata CoreMenuItemsFlags@>
<?commatable mergeKey="id"?>
id,                                flags
STANDARD_SEARCH,	isAdmin
STANDARD_CHECK_IN,	isAdmin
<@end@>
About these ads

9 thoughts on “Conditionally hide the Standard Search and Standard Check-in links in Oracle UCM 11g

  1. Hello,

    First of all thank-you for this and second I would also like to hide the “Site Sutdio Files” menu options from non-admin users as well, could you tell me how I would be able to do this? Thanks :)

    • Hi Sandra! I am glad you found this post helpful. I don’t have any experience with Site Studio at this time, but I am aware of a Site Studio set of menu options that appears under the Administration menu in UCM, once Site Studio is installed, so I looked there first… However, if the user is not an administrator, they do not see any of the Administration menus, so maybe this is not what you’re referring to (in fact I did not find a “Site Studio Files” in this menu set I mention). What version of UCM are you working with, and where can I find the “Site Studio Files” menu?

      • Oh I see. I think the Site Studio menu options might be something specific to our particular configurations than. The options show under the New Check-in and Search drop down boxes for us. And we are using 11gR1-11.1.1.5.0.

  2. Hi Derrick Roberts,

    I modified under our custom page, but still its not showing up.
    cs/custom/resource/custom_resource.htm
    and also under D:\Oracle\Product\Middleware\Oracle_ECM1\ucm\idc\resources\core\idoc\std_nav.idoc file.
    Either its showing everything or not showing anything.

    I just want to hide Standard search and Standard Check-in to all the users.

    Thanks & Regards,
    lpathi

    • Hi Ipathi. Is your environment 11g? If so, I’m guessing your problem is that you simply put the isAdmin flag on the existing search and check-in entries in CoreMenuItems instead of creating new link entries. These entries are “parent” entries that contain the standard and profille specific links, which is why you need to restructure CoreMenuItems a little bit to hide only the standard links. Read the bullets above carefully, they explain what to do. Good luck!

      • Hi Derrick Roberts,
        I have only placed below code in CoreMenuItemsFlags
        STANDARD_SEARCH, isAdmin
        STANDARD_CHECK_IN, isAdmin

        might be I am little bit confused with placing the code correctly.

        Thanks & Regards,
        lpathi

  3. Hi Derrick Roberts,
    Yes, our evn. is 11g.
    When I place isAdmin flag in CoreMenuItems, Standard search and check-in is hided, but it hided in weblogic user also and one of the profiles also hided.
    We have two profiles, one is showing and another one hided along with Standard search and check-in.
    Again, I am asking the question; sholud place the code in both places std_nav.idoc file and custom_res.htm file or std_nav.idoc will suffice.

    Thanks & Regards,
    lpathi

  4. Hi Derrick Roberts,
    i have modified the std_nav.idoc

    id, label, linkType, linkData
    SEARCH, wwSearch, cgi, IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=STANDARD_QUERY_PAGE
    STANDARD_SEARCH, Standard Search, ,
    MY_PERSONAL_SEARCHES_LIST, , ,
    NEW_CHECK_IN, wwNewCheckIn, cgi, IdcService=CHECKIN_NEW_FORM
    STANDARD_CHECK_IN, Standard Check-In, ,
    MY_PERSONAL_CHECKINS_LIST, , ,

    parentId, id, loadOrder
    STANDARD_SEARCH, STANDARD_SEARCH, 1000
    STANDARD_CHECK_IN, STANDARD_CHECK_IN, 1000

    id, flags
    STANDARD_SEARCH, isAdmin
    STANDARD_CHECK_IN, isAdmin

    Requires urgent help.
    Thanks & Regards,
    lpathi

    • Please take a closer look at the sample code in my post. I also have a component you can download (link in the post). Your modification has simple errors, one of them being that your parent ids are the same as your child ids.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s