Active Directory user repository in WPS

to add a persistent link to the theme which will add a new page at the currently selected level of navigation in WPE. This is useful for many situations including where you have a tab based navigation, you can have a “New page” tab where users can simply specify a page name and add a new tab at the same level as the other tabs. It goes like this:

<c:forEach var="i" begin="${themePolicy.topNavigationStartLevel}"
end="${themePolicy.topNavigationStopLevel}" step="1">
<portal-navigation:navigation startLevel="${i}" stopLevel="${i}">
<%-- New page --%>

NavigationNode currentNode = (NavigationNode)wpsSelectionModel.getSelectedNode();

NavigationNode parentNode = (NavigationNode)wpsNavModel.getParent(currentNode);

String parentIDString =


<portal-internal:adminlinkinfo name="PROPERTIES_PORTLET">

<portal-navigation:urlGeneration contentNode="<%=wpsContentNode%>"

layoutNode='<%= wpsCompositionNode %>'




<portal-navigation:urlParam name="init" value="init" />

<portal-navigation:urlParam name="OCN" value="<%= parentIDString %>" />

<portal-navigation:urlParam name="WCN" value="<%= parentIDString %>"/>

<portal-navigation:urlParam name="PAT" value="PTQ" />

<portal-navigation:urlParam name="PNT" value="PNTC" />

<portal-navigation:urlParam name="psh" value="push" />

<a href="<% wpsURL.write(out); %>">New Page</a>





note: It could be cleaned up, but you get the idea. The relevant points are that you need to pass the parent’s ObjectID String into the OCN and WCN url parameters for the urlGeneration tag, and you need to use the AdminPortletUtils.getStringObjectID(ObjectID id) in order to transform an ObjectID into a String.