5 Replies Latest reply: Aug 31, 2012 2:03 AM by Sreenivas Reddy Kandula RSS

    How to create menus linking to portal pages in user Navigation.xml

    Olivier Picciotto Newbie

      Gatein supports customizing the

       

      portal/WEB-INF/conf/portal/user/template/user/navigation.xml

       

      file to create default nodes any user can use when he goes to the dashboard page. In this navigation.xml we add nodes in the following syntax

       

      <node-navigation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2 http://www.gatein.org/xml/ns/gatein_objects_1_2"

                xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">

                <priority>3</priority>

                <page-nodes>

                          <!-- The default dashboard tab -->

                          <node>

                                         <name>MySpace</name>

                                         <label>MySpace</label>

                                         <page-reference>user::@owner@::Tab_Default</page-reference>

                          </node>

                          <node>

                                         <uri>Contracts</uri>

                                         <name>Contracts</name>

                                         <label>Contracts</label>

                                         <page-reference>portal::MyPortal::Contracts</page-reference>

                          </node>

        </page-nodes>

      </node-navigation>

       

      As you see we add a dashboard TAB with a page reference to user:@owner@::Tab_Default

      And an aother node pointing to page-reference portal::MyPortal::Contracts

       

      We also add navigation portlet to the portal/WEB-INF/conf/portal/user/template/user/user.xml

       

      As is :

       

      <portlet-application>

                          <portlet>

                                    <application-ref>web</application-ref>

                                    <portlet-ref>NavigationPortlet</portlet-ref>

                          </portlet>

                          <access-permissions>Everyone</access-permissions>

                          <show-info-bar>false</show-info-bar>

      </portlet-application>

       

      When the user goes to the dashboard page, evrything seems to work ok, the dashboard is displayed with a NavigationPortlet with a 'MySpace' and a 'Contract' menu. But, when the users clicks on the menu, the link is computed to

       

      http://<server>/portal/u/<username>/<nodename> instead of http://<server>/portal/<MyPortal>/<NodeName>

       

      preventing the user to link to the standard portal pages.

       

      Any ideas ?