Show TOC

Background documentationnavZoomTitle Locate this document in the navigation structure

 

Outputs the title associated with the current navigation zoom.

Attributes

Name

Mandatory

Description

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.

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().

Variables

The <title> attribute: a string object representing the navigation zoom title, not mandatory.

Cooperating Tags

The tag must be nested in the ifNavZoomIsActive tag.

Example

The following displays the Main Portal title, if the user has not yet zoomed into some navigation zoom point. Otherwise the navigation zoom title is displayed together with the Back to Main Portal link.

Syntax Syntax

  1. <nav:ifNotNavZoomIsActive>
        <h1>Main Portal</h1>
    </nav:ifNotNavZoomIsActive>
    <nav:ifNavZoomIsActive>
        <h1><nav:navZoomTitle/></h1>
        <nav:navZoomBackTargetAnchor 
         anchorAttributes="class=\"backLink\"">
            Back to Main Portal
        </nav:navZoomBackTargetAnchor>
    </nav:ifNavZoomIsActive>
    
End of the code.

To make the navigation zoom title language dependent, you can use the navigation zoom title for the zoom point defined as a key in a custom resource bundle:

Syntax Syntax

  1. <%!
    private String getNLSString(
        IPortalComponentRequest request, 
        String key) {
        try {
            ResourceBundle bundle = request.getResourceBundle();
            if(bundle != null) {
                return bundle.getString(key);
            }
            return key;
        } catch(MissingResourceException e) {
            return key;
        }
    }
    %>
    <nav:ifNotNavZoomIsActive>
        <h1>Main Portal</h1>
    </nav:ifNotNavZoomIsActive>
    <nav:ifNavZoomIsActive>
        <h1>
          <nav:navZoomTitle title="zoomTitle"/>
          <%= getNLSString(componentRequest,zoomTitle) %>
        </h1>
        <nav:navZoomBackTargetAnchor 
         anchorAttributes="class=\"backLink\"">
            Back to Main Portal
        </nav:navZoomBackTargetAnchor>
    </nav:ifNavZoomIsActive>
    
End of the code.