Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

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("")) {

3 Comments