WebSphere Portal Server - Question for WPS theme developers

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > August 2005 > Question for WPS theme developers





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Question for WPS theme developers
sliderzx3

2005-08-24, 10:44 am

Hello all,

Scenario: I installed a theme (dynamic drop down menu) into WPS 5.1.0.1 that starts at the my portal context root.

The logic in the theme is that it loops through everything under MyPortal and displays Page1 and Page 2 on the menu bar.
If you click on Page 1, a and b will be shown in a drop down under Page1. If you click on Page2, 2a and 2b will be
shown in the drop down.

If I apply this dynamic drop down theme in a page outside of MyPortal, let's call it Hidden Page X
the drop-down theme works "flawlessly" and as it should.

My Portal (context root)
_______|_______
| |
Page 1 Page2 (Pages)
| |
1a 2a (subpage)
| |
1b 2b (subpage)


Problem:

I don't want it to work as it should. I want it to display the menu hierarchy under MyPortal, Not the
Menu of Hidden Page X.


Question:

Is there any way of doing this? The only scenario I can see is defining a new theme
and statically hard-coding the portal pages in the theme jsps. Is there something I can do dynamically?

I notice in the limited tutorial in the IBM Portal5.1 Infocenter that the navigationLoop variables include
nodeTitle.

Is there way I can explicitly say start at nodeTitle MyPortal and show everything under it no matter what page
you are in.




This is a relevant snippet of my code in the PlaceBarInclude.jsp:
Is there a variable that I can set to explicitly say, start at page MyPortal.

<wps:navigation startLevel="2" stopLevel="3">

<wps:navigationLoop>
<%
if (wpsNavLevel.intValue() == 1) { // start at first node
boolean nodeHasChildren = wpsNavModel.hasChildren(wpsNavNode);
idx++;
if (!bNewPlace) { %>
}
return menu; // returns drop down menu
}

2005-08-25, 6:05 pm

Using nodeTitle might get you into trouble if you are supporting multiple langugages. To match a particular node, you will want to define a custom unique name for it (always a good idea anyway, especially useful when migrating via xmlaccess between envir
onments) and then use wpsNavNode.getObjectID().getUniqueName() to retrieve it.

I think you will have to define a new theme, if only because you want the navigation to behave differently on Hidden Page X than on the rest of the portal. But you don't have to hand-code all of your pages either. You can set the navigation to start its
loop at level 1, identify the My Portal page by its unique name, and only display navigation under that page.

More I can't say without a better picture of what you've done so far and what you're trying to do.

-Meredith
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com