Skip to Content

The task

When I implemented the sitmap for a customer, the need arose to include a special navigation hierarchy starting at the fourth level. This hierarchy represents portal pages not being available directly through the TLN, which displays only three levels. Those Pages  contain information like the disclaimer, copyright and other content only available via quicklink or sitemap.

h2. The problem

Since the NavigationTagLibrary of the portal does not support setting the root node other than using the first node of the selected path, I went on using the Navigation API directly. Alas, this did not succeed in the first place. The node I retrieved from the API didn’t include merged nodes, thus missing the pages not being a direct member of the role with the quicklink used. The sitemap was still incomplete.

h2. The solution

Thanks go to Praveen for the best hint regarding this problem. The solution is to process the quicklink node through the NavigationHelperService to enrich it with the merged nodes.

This code demonstrates how it works:


// Need this to get the "xxx"-Node, which is hidden on level 4
INavigationService service = (INavigationService)
PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
// Environment hashtable with current navigation principal and username

Hashtable env = new Hashtable();
env.put(“NavigationPrincipal”, componentRequest.getUser());
String username = componentRequest.getUser().getUniqueName();
if (username != null && !username.equals(“”)) {

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. ah beng
    Hi i was trying to use NavigationEventsHelperService but it seems like i cant seem to resolve this class. It seems that it should be located in com.sapportals.portal.navigation but it is not actually in the java docs. how can i get this class to work?
    (0) 

Leave a Reply