Pagelet and Portlet Development: Adaptive Pagelets

Adaptive Tags: Navigation

In AquaLogic Interaction 6.0 and above, customizing navigation can be done without coding against the portal UI. Navigation Tags are used with Data Tags to build complete navigation solutions. You can also use UI Tags to add UI elements to custom navigation schemes. The 6.0 portal is shipped with a Navigation Tags Header Portlet that implements navigation using tags.

Navigation Tags Library (pt:plugnav)

The Navigation Tags library is used to manage display of navigation elements. These tags must be used with data tags from the Data Tags library described below.

Tag

Function

pt:plugnav.ddmenurowcontainer

Manages the display and positioning of navigation tabs that activate dropdown menus. (Only accepts ddmenutab or ddmenusimpletabs or equivalent as data.)

pt:plugnav.ddmenusimpletabs

Defines a list of simple tabs using the data provided. (Must be used with ddmenurowcontainer or equivalent.)

pt:plugnav.ddmenutab

Defines a tab that activates a dropdown menu with the data provided. (Must be used with ddmenurowcontainer or equivalent.)

pt:plugnav.horizontalrowcontainermenu

Generates and displays HTML for dynamic horizontal menus. (Only accepts horizontalrowtab or equivalent as data.)

pt:plugnav.horizontalrowtab

Defines a horizontal menu tab that displays a row of links using the data provided. (Must be used with horizontalrowcontainermenu or equivalent.)

For more information and sample code, see the examples on the next page. For a full list of tags, see the TagDocs.

Data Tags Library (pt:ptdata)

The Data Tags library provides access to URLs for most navigation-related components, such as a user’s my pages, my communities, subcommunities, my account page or administration.

Each data tag requires an ID that is set with an attribute and returns a single URL, a collection of URLs, or nothing. Data tags might return no URL at all if a user does not have access to the referenced page. You can also create a collection of data tags by setting the same ID on multiple data tags.

<pt:ptdata.mypageactionsdata pt:id="mypagemenu" />
<pt:ptdata.mypagesdata pt:id="mypagemenu" />

In addition to the URL, each navigation data tag also provides additional information, such as the title of the URL and the icon associated with the URL. Certain types of URLs also contain objectIDs, classIDs, or a current page flag. It is also possible to get values for individual query string parameters from an URL. The URL and all other data is stored as a dataobject (DO) component. Each DO component can be accessed through a text replacement syntax. Data tags take in the following URL attributes: title, url, uri, img, imgwidth, imgheight, and params. For an explanation of data types and a full list of parameters, see the TagDocs.  

For example, the following code gets the title and URL component from the mydata URL.

<pt:ptdata.administrationdata pt:id="mydata" />
<pt:logic.value pt:value="$mydata.title"/>
<pt:logic.value pt:value="$mydata.url"/>

After transformation, this code generates the following data:

Administration
http://servername/portal/server.pt?open=space&name=ObjMgr&parentid=7&parentname=ObjMgr&control=AdminRedirect&in_hi_userid=1&cached=true

Data tags return URL attributes as data; they must be used in conjunction with a display tag (i.e., pt:plugnav or pt:core.html). For more details, see the examples on the next page.

The table below is broken up into four sections:

(For an alphabetical list of data tags, see the TagDocs.)  

Tag

Function

Basic Portal Components

pt:ptdata.loginlogoffdata

Returns URL to Login/Logoff action based on the current state of the user. (If the user is logged in, the URL executes logoff; if the user is not logged in, the URL executes login.)

pt:ptdata.myaccountdata

Returns URL to current user's My Account page.

pt:ptdata.administrationdata

Returns URL to portal Administration. The URL is only returned if the user has permission to access Administration.

pt:ptdata.directorybrowsedata

Returns URL to the portal Knowledge Directory in browse mode.

pt:ptdata.directoryeditdata

Returns URL to the portal Knowledge Directory in edit mode.

pt:ptdata.advancedsearchdata

Returns URL to the Advanced Search page.

pt:ptdata.federatedsearchdata

Returns URL to the Federated Search page.

pt:ptdata.helppagedata

Returns URL to the portal online help.

pt:ptdata.genericurl

Returns URL based on parameters set in tag attributes.

MyPages

pt:ptdata.mypagesdata

Returns a list of URLs to the user's MyPages.

pt:ptdata.mypageactionsdata

Returns a list of URLs to the user's MyPage-related actions.

pt:ptdata.editmypageactionsdata

Returns URL to launch the Edit MyPage editor.

pt:ptdata.editmypageportletprefsdata

Returns URL to launch the Edit MyPage Portlet Preferences editor.

pt:ptdata.createnewmypagedata

Returns URL to launch the Create New MyPage editor. The URL is not returned if the user already has the maximum number of MyPages.

pt:ptdata.addmypageportletsdata

Returns URL to launch the Add Portlets to MyPages editor.

pt:ptdata.deletemypagedata

Returns URL to the Delete MyPage action. The URL is not returned if the user is on the main MyPage.

Experience Definitions

pt:ptdata.myhomedata

Returns URL to current user's Home page as specified in the associated experience definition.

pt:ptdata.mandatorylinksdata

Returns a list of URLs to the user's Mandatory Links as specified in the associated experience definition.

pt:ptdata.mandatorylinksnamedata

Returns the name of the Mandatory Links folder as a string.

Communities

pt:ptdata.mycommunitiesdata

Returns a list of URLs to the communities in the user's My Communities list.

pt:ptdata.communitypagesdata

Returns a list of URLs to the pages in the specified community.

pt:ptdata.currcommunitypagesdata

Returns a list of URLs to the pages in the current community.

pt:ptdata.subcommunitiesdata

Returns a list of URLs to the subcommunities for the specified community.

pt:ptdata.currsubcommunitiesdata

Returns a list of URLs to the subcommunities for the current community.

pt:ptdata.relatedcommunitiesdata

Returns a list of URLs to the related communities for the specified community.

pt:ptdata.currrelatedcommunitiesdata

Returns a list of URLs to the related communities for the current community.

pt:ptdata.communitykddata

Returns the URL to the community Knowledge Directory

pt:ptdata.communityactionsdata

Returns a list of URLs to the user's community-related actions.

pt:ptdata.editcommunitydata

Returns URL to launch the Community Editor for the current community.

pt:ptdata.createnewcommpagedata

Returns URL to launch the Create New Community Page page of the Community Editor. The URL is returned only if the user has permission to edit the community.

pt:ptdata.addcommunityportletsdata

Returns URL to launch the Add Portlets page of the Community Editor. The URL is returned only if the user has permission to edit the community.

pt:ptdata.joincommunitiesdata

Returns URL to launch Join Communities editor.

pt:ptdata.joinparentcommunitydata

Returns URL to launch Join Communities editor for the parent Community of the current Community.

pt:ptdata.joincurrcommunitydata

Returns URL to the Join Current Community action.

pt:ptdata.joincurrparentcommunitydata

Returns URL to the Join Current Community action for the parent Community of the current Community.

pt:ptdata.unsubscribecommunitiesdata

Returns URL to the Unsubscribe Communities editor.

pt:ptdata.navsettingvalue

Returns a list of URLs to the communities listed in the NavigationSettings.xml file, specified by the commID attribute.

The example on the next page creates a left vertical navigation bar using tags. For more information on specific tags, see the TagDocs.

Next:  Navigation Tag Example