Access Keys:
Skip to content (Access Key - 0)

Adaptavist Documentation Move

This documentation is deprecated. Adaptavist's documentation has moved to a new location where it is maintained and updated. Please visit Adaptavist's new Documentation area.

compound-menuitem macro


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

The macro combines the features of the menuitem macro, menulink macro and menuicon macro resulting in cleaner syntax and a three fold performance increase.

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


This macro requires Theme Builder 3.0 or above.




Property Required Default Notes Ver
default   The destination to link to (see list below) 3.0
caption   The link text to be displayed to the user. 3.0
space current space Optionally set the space to which the link relates. 3.0
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. 3.0
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. 3.0
link   When using the "custom" destination (see examples) this is the URL to link to. 3.0
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)1 3.0
accesskey   An optional shortcut key for the link which can be any alphanumeric character2 3.0
target current browser window An optional target window or frame in which to load the link destination. 3.0
class   Optional HTML classes to associated with the hyperlink. 3.0
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
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
icon none the icon to use as one of SPACEKEY:pagename^filename.ext/custom url/inbuilt icon (use 'noicon' to prevent an icon being displayed) 3.0
imginside false Defines whether the icon (if present) should be within the link tag or outside it. This is useful when displaying just an icon link on the main menu bar.
  • false - icon is outside the link tag (default)
  • true - icon is inside the link tag
size 16 When used with the compound-menuitem macro, defines the pixel size (same for width and height) of the icon if shown. 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
item     3.0
flag   The macro is rendered only if one or more of the specified flags are set. See Working with Flags for more details. 3.3.6
notflag   The macro is rendered only if none of the specified flags are set. See Working with Flags for more details. 3.3.6
Ref Notes
1 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.
2 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, viewattachments 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 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



Linking to a wikipage

Basic use

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:

{compound-menuitem:edit|tooltip=Edit this content|accesskey=e|caption=Edit this %page%}

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.

Share Menu

To include the Share menu, you can make a Link Alias called, say, sharepage for Share Page - Share then reference that in the macro e.g. {compound-menuitem:sharepage...}

View old comments

Adaptavist Theme Builder Powered by Atlassian Confluence