AquaLogic User Interaction Development Guide

     Previous Next  Open TOC in new window   View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Implementing Custom Navigation Using Adaptive Tags

Navigation tags are used with Data tags to build complete navigation solutions for AquaLogic Interaction.

The first step is coding the portlet.
Initialize the menus by retrieving the navigation links using data tags. To create a collection, set the same ID on multiple data tags. For details on the ptdata tag library, see Data Adaptive Tag Library (pt:ptdata).
<span xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'>
<html> 

<!-- Links to my pages are stored in mypagemenu -->
<pt:ptdata.mypageactionsdata pt:id='mypagemenu' />
<pt:ptdata.mypagesdata pt:id='mypagemenu' /> 

<!-- Links to my communities are stored in commmenu -->
<pt:ptdata.communityactionsdata pt:id='commmenu' />
<pt:ptdata.mycommunitiesdata pt:id='commmenu' /> 

<!-- Links to directory are stored in directorymenu -->
<pt:ptdata.directorybrowsedata pt:id='directorymenu' />
<pt:ptdata.directoryeditdata pt:id='directorymenu'/> 

<!-- Mandatory links are stored in mandlinks-->
<pt:ptdata.mandatorylinksdata pt:id='mandlinks' />
<pt:ptdata.mandatorylinknamedata pt:key='mandlinksname'/>

<!--Links to administration and mandatory communites are stored in menutabs -->
<pt:ptdata.administrationdata pt:id='menutabs' />
<pt:ptdata.mandatorycommunitiesdata pt:id='menutabs'/> 
Next, create the structure to display the menus. To replace standard ALI navigation using a header portlet, use navigation tags to handle display as shown in the code sample below.
<!-- Dropdown menus section begin -->
<pt:plugnav.ddmenurowcontainer pt:menuvar='midrowmenu' pt:hideemptymenus='true' >
<pt:plugnav.ddmenutab pt:containervar='midrowmenu' pt:datavar='mypagemenu' pt:text='$#1840.ptmsgs_portalbrowsingmsgs' />
<pt:plugnav.ddmenutab pt:containervar='midrowmenu' pt:datavar='commmenu' pt:text='$#1841.ptmsgs_portalbrowsingmsgs' />
<pt:plugnav.ddmenutab pt:containervar='midrowmenu'pt:datavar='directorymenu'pt:text='$#1842.ptmsgs_portalbrowsingmsgs' />
<pt:plugnav.ddmenutab pt:containervar='midrowmenu' pt:datavar='mandlinks' pt:text='$mandlinksname' />
<pt:plugnav.ddmenusimpletabs pt:containervar='midrowmenu' pt:datavar='menutabs' />
</pt:plugnav.ddmenurowcontainer>
<!-- Dropdown menus section end -->
You can also display navigation links within a portlet, as shown in the sample code below.
<table cellpadding='0' cellspacing='0' width='200' border='0'>
  <tr>
    <td height='2' colspan='3'>
    </td>
  </tr>
  <tr class='menuHeaderBg'>
    <td align='left' valign='middle' height='20' colspan='3' class='navSidebarSectionHeader'>
    &nbsp; &nbsp;My Communities
    </td>
  </tr> 

<!-- links to communities are entered here -->
<pt:logic.foreach pt:data='commmenu' pt:var='temp'>
  <tr class='navMidtabBg'>
    <td height='16' colspan='2' class='navMidtabBtn'>
    <table cellpadding='0' cellspacing='0' width='100%'>
      <tr>
        <td height='20' width='100%' nowrap='nowrap' colspan='1' class='objectBtn'>
        <span class='actionbarBanText'>
          <pt:core.html pt:tag='img' src='$temp.img' alt='' border='0' align='absmiddle' height='20' width='20' />
          <pt:core.html pt:tag='a' href='$temp.url'>
            <pt:logic.value pt:value='$temp.title' />
          </pt:core.html>
        </span>
        </td>
      </tr>
    </table>
    </td>
  </tr>
</pt:logic.foreach>
</table>
You can also add portal UI elements to custom navigation using UI tags. For details on UI tags, see UI Adaptive Tag Library (pt:ptui).

To deploy a custom navigation header portlet in ALI (to replace standard navigation), follow the steps below.

  1. Register the portlet in the portal.
  2. Create an Experience Definition that uses the custom navigation header portlet you registered in step 1.
  3. Create an Experience Rule to direct users to the new Experience Definition. For details on Experience Definitions and Experience Rules, see the Administrator Guide for AquaLogic Interaction.

  Back to Top      Previous Next