Access Keys:
Skip to content (Access Key - 0)
Home (Access Key - 1)
All spaces... (Access Key - 3)
Log in (Access Key - 5)
Sign up (Access Key - 6)
Toggle Sidebar

menulink macro

(None)

{menulink} Macro

Description

This macro creates a link to a specific Confluence feature or page relative to the current location in the wiki.

Each link destination abides by all applicable permissions - should the user not have sufficient permission to use the link, or simply be in a location where the link is not applicable, the body of the macro is returned un-linked (which is then usually hidden by the menuitem macro).

Requirements

This macro requires Theme Builder 2.0 or above.

Usage

{menulink:linktype|tootlip=tooltip text|accesskey=key}Link Text{menulink}

Parameters

The Ver column denotes the minimum version of Theme Builder that is required.

Property Required Default Notes Ver
default   The destination to link to (see list below) 2.0
space current space Optionally set the space to which the link relates.  
page current page Optionally set the page to which the link relates, eg. when using the "newpage" destination you can define the parent page with this parameter. 1  
parent space homepage When using the "exportMail" destination, this defines the page that will be the parent of the new page containing the exported mail message.  
link   When using the "custom" destination (see examples) this is the URL to link to.  
toggle   When using the "toggleVisibility" destination (see examples) this is the HTML id of the tag to show/hide. 3.0
tooltip   The tooltip to display when the mouse hovers over the link (max: 77 chars for cross-platform compatibility) 2  
accesskey   An optional shortcut key for the link which can be any alphanumeric character 3  
target current browser window An optional target window or frame in which to load the link destination. 2.0.9
class   Optional HTML classes to associated with the hyperlink.  
hideanon false Whether to hide the link from anonymous users:
  • false - don't hide from anonymous users (default)
  • true - always hide from anonymous users, even if they have privileges to use the link
3.0
rel automatic The "rel" attribute to assign to the link. Many links get an automatic rel attribute (eg. rel="index" for the index link) and also "nofollow" rels to prevent search engines following links that alter content, etc. 3.0
layout   When using the use-layout location, defines the layout ID to use. 3.0
latch false When using the use-layout location, determines whether the layout should be used temporarily for the resulting page view or latched for all subsequent page views.
  • false - don't latch the layout (default)
  • true - latch the layout so it's used for subsequent page views
3.0
item     3.0

Footnotes
Reference Notes
1 Use Builder 2.0.7 or above if you are using Confluence 2.5 or above to get the "page" parameter to work properly.
2 When using the link in a menu, tooltips will only be shown if enabled in theme configuration. In all other formats, the tooltip will always be shown when the mouse hovers over the link.
3 When using links inside menus, you can also prefix a letter in the link text with an "_" to define the access key - this letter will then be underlined when displayed in the menu. Access keys only work when the associated item is visible on screen.

Caption Fields

Some link locations provide fields for captions which get automatically replaced when the links are displayed based on the state of the link location.

For example, the %page% field will be replaced with either "page" or "news" depending on whether you're looking at a page or a blog post.

Click for example

Field Link Destinations Notes
%page% information, edit, remove, favourite, favouritespace, watch, watchspace, watchpage Displays either "page", "news" or "space" as applicable to the content you are currently viewing.
%count% spaceattachments, children, comments, pageattachments Displays the number of attachments, children or comments as applicable to the link location.
%user% profile, userspace Displays the users full name.
%space%, %Space% activity Displays "space" or "site" - the %Space% field capitalises the first letter, eg. "Space" or "Site".
%add% favourite, favouritespace, watch, watchspace, watchpage Displays "Add" or "Remove" depending on whether the content is in your favourites or watched.
%watching%, %watch% watch, watchspace, watchpage Displays "Watching" or "Watch" (%watching%), "Watch" or "Unwatch" (%watch) depending on whether you are watching the content.

Link Destinations

The following link destinations can be used in the menulink macro and also the compound-menuitem macro.

The Ver column denotes which version of Theme Builder is required.

Account management

Community Features

Web Feeds

Folksonomy (Labels/Tags)

Interest Management

Content Creation

Content Management

Content Exporting

Display Mode

Visibility Settings

General Navigation

Hierarchical Navigation

Custom Links

Theme Configuration

Administration

Examples

Basic use

Links in menus

Linking to a Space

Links to features in other spaces

Tooltips and Access Keys

Hiding Inactive Links

Link Target

Toggle the Visibility of an on-screen element

Linking to other sites

How do I show Web UI links?

Hints and Tips

You can create keyboard shortcuts by adding empty menulinks to a panel in builder (eg. title or footnotes panel, etc), for example:

{menulink:edit|tooltip=Edit this content|accesskey=e}{menulink}

This would add the keyboard shortcut "Alt+E" to all screens that can be edited (eg. blogposts, pages, etc). The shortcut would only be available if the current user has sufficient privileges to edit the page, etc.

Toggle Sidebar