Show TOC

Background documentationrelatedNavNodeAnchor Locate this document in the navigation structure

 

Outputs an HTML link (the anchor <a> tag with a nested text or an image) for navigating to the current navigation node, which is a related node of another node exposed by an iterator tag or a node tag.

Attributes

Name

Mandatory

Description

anchorAttributes

No

A string that is added inside the anchor tag, in which you can add additional HTML attributes for the anchor tag, such as class.

EPCMHistoryMode

No

Indicates whether the navigation node is added to the portal's history list on the page title bar and, if it is, whether duplicate entries are allowed if a user clicks on the link multiple times.

The valid values are:

  • 0: Added to history with duplicates

  • 1: Added to history without duplicates (default)

  • 2: No tracking

This attribute is only relevant when the navigationMethod attribute is set to byEPCM.

hashURL

No

Indicates whether to set the value of the anchor's href attribute to the standard navigation URL or to its hashed URL.

The following are valid values:

  • true (default)

  • false

Any other value is equivalent to true.

locale

No

Indicates the locale to use for retrieving and displaying the node's title.

Valid values are the string representations of java.util.Locale objects, such as en, en_US, de_DE, zh_CN.

If not specified, the request locale is used.

navigationMethod

Yes

Indicates whether to use client-side eventing for navigation after the user clicks the link.

The valid values are:

  • byEPCM: Use client-side eventing (a Javascript call defined in the anchor's onclick attribute).

  • byEPCMwithURL: Use client-side eventing as above, but also set the anchor's href attribute to the navigation URL.

    The actual navigation is performed by the EPCM method, so the href URL is ignored. This URL is used when the user right-clicks the link and chooses Open in New Window or Add to Favoritesfrom the browser's context menu.

  • byURL: Do not use client-side eventing. This eliminates the need for EPCM Javascript, reducing network traffic. This option is useful, for example, for the implementation of an external-facing portal in low-bandwidth scenarios.

    This option prevents the navigation node from being added to the history list.

    For more information, see Implementing an External-Facing Portal.

navigationMode

No

Indicates how to launch the node when the user clicks the link.

The following are valid values:

  • 0: Node is launched in the same frame.

  • 1: Node is launched in new window.

  • 2: Node is launched in a new session of the portal, which is displayed in a new window.

The values are defined by the constants defined in INavigationConstants and with the prefix SHOW.

title

No

The visible text for the link. If not specified, the title of the navigation node is used, which is the same as the value returned by INavigationNode.getTitle().

urlParameters

No

A string that is appended to the URL in the anchor tag's href attribute. This attribute enables you to add parameters to the link URL.

Cooperating Tags

The tag must be nested in the iterateRelatedNavNodes tag.

Example

The following displays a list of related links, if the current context node has related nodes.

Syntax Syntax

  1. <nav:contextNavNode>
        <nav:ifNavNodeHasRelatedNavNodes>
            <ul>
            <nav:iterateRelatedNavNodes>
                <li class="relatedLink">
                    <nav:relatedNavNodeAnchor navigationMethod="byURL"/>
                </li>
            </nav:iterateRelatedNavNodes>
            </ul>
        </nav:ifNavNodeHasRelatedNavNodes>
    </nav:contextNavNode>
    
End of the code.