[All Adaptavist Apps]

Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

{menulink} Macro

Description

This macro creates a link to a specific Confluence feature in relation to the current location within 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).

Usage

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

Parameters

Property

Required

Default

Notes

default

 

The destination to link to (see list below)

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.

Unknown macro: {footnote}

Use Builder 2.0.7 or above if you are using Confluence 2.5 or above to get the "page" parameter to work properly.

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.

target

 

When using the "toggleVisibility" destination (see examples) this is the HTML id of the tag to show/hide.

tooltip

 

The tooltip to display when the mouse hovers over the link (max: 77 chars for cross-platform compatibility)

Unknown macro: {footnote}

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.

accesskey

 

An optional shortcut key for the link which can be any alphanumeric character

Unknown macro: {footnote}

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.

target

current browser window

An optional target window or frame in which to load the link destination.

class

 

Optional HTML classes to associated with the hyperlink.

Unknown macro: {display-footnotes}

Link Destinations

The following destinations are currently supported by this macro (the Ver column denotes which version of Theme Builder is required):

Destination

Default Location

Notes

Ver

advanced

Edit > Administration > Advanced

Displays the "advanced" screen

2.0.0

children

View > Show Children

If a page has child pages, this option allows the user to toggle their display

2.0.0

comments

View > Show Comments

If a page has comments, this option allows the user to toggle their display

2.0.0

configuretheme

Edit > Administration > Configure Theme

Displays the theme configuration page

2.0.0

copy

Edit > Copy this Page...

Creates an editable copy of a page (and optionally copies over it's children)

 

custom

 

Allows you to specify a custom URL. This is often useful if you want an external web page to launch in a new window because you can combine it with the "target" parameter.

 

dashboard

View > Other Pages > Dashbaord

Site dashboard

2.0.0

edit

Edit > Edit this Page/News...

Edits the current page or news item

2.0.0

emailpage

View > This Page > Email This Page...

Allows a user to email the current page to a friend.

2.0.7

exportMail

View > This Page > Export to Wiki Page

When viewing a mail message in the space mail archive, this will export that message (including attachments) to a new, editable wiki page

2.0.7

exportPDF

View > This Page > Export to Adobe Acrobat (PDF)

Exports the page (and in some versions of Confluence, a blog post) to a PDF file

2.0.0

exportWord

View > This Page > Export to Microsoft Word

Exports the page (and in some versions of Confluence, a blog post) to a Word document

2.0.0

favourite

View > This Page > Add/remove favourite

Adds or removes the current page/news/space to or from personal favourites

 

globaltemplates

Edit > Administration > Global Templates

Displays the global templates

2.0.0

history

View > Account > History

Displays the history of visited pages, for the current user, in a new window

2.0.0

home

View > Other Pages > Home Page

If used within a Space, this takes the user to the space home page. If used anywhere else, the site home page is shown. The site home page is either the user's homepage (if set in their profile), the site homepage (if set in General Configuration) or the Dashboard (default)

2.0.0

index

View > Other Pages > Index

Displays the alphabetical index of content in a Space

2.0.0

information

View > This Page > Page Information

Displays information for a page or blog post

2.0.0

labels

View > Other Pages > Labels

Displays the labels within a space or global labels if used outside a Space

2.0.0

login

View > Account > Login

If the user is logged out, this will take them to the login screen

2.0.0

logout

View > Account > Logout

If the user is logged in, this will take them to the logout screen

2.0.0

mail

View > Mail

If a Space has mail in it's mail archive, this will display the mail archive

2.0.0

map

View > Other Pages > Site Map

Displays the tree view of hierarchical pages (with current page selected if applicable) within a Space

2.0.0

newcomment

Edit > New > Comment...

Creates a new comment on a page or news item (blog post) within a Space

2.0.0

newnews

Edit > New > News...

Creates a new news item (blog post) within a Space

2.0.0

newpage

Edit > New > Page...

Creates a new page within a Space

2.0.0

newspace

Edit > New > Space...

Creates a new Space

2.0.0

news

View > Other Pages > News

Displays the recent news within a Space

2.0.0

normalView

View > This Page > Normal view

The normal view of a page. When viewing attachments, info, etc., on pages and blogs, this will take you to the actual page view

2.0.0

pageattachments

Edit > Attachments

Displays the attachments for a page or news item

 

printableView

View > This Page > Printable view

The print preview of any page. If a sidebar is set to be "collapsed by default" it will not appear in the print preview. The menu and navigation bars are never shown in print preview.

2.0.0

profile

View > Account > Preferences: <name>

If the user is logged in, this will take them to their personal profile screen

2.0.0

recent

View > Other Pages > Recent Updates

Displays the list of recent updates within a Space

2.0.0

remove

Edit > Remove this Page/News...

Deletes (after confirmation) the current page or news item

 

RSS

View > Other Pages > RSS Feed Builder

Displays the RSS Feed Builder

2.0.0

search

 

Links to the search screen (defaulting to searching the current space where applicable).

 

signup

View > Account > Sign-up

Displays the user sign-up screen (if public sign-up is enabled in General Configuration)

2.0.2

siteadmin

Edit > Administration > Site Administration

Displays the Administration Console

 

spaceadmin

Edit > Administration > Space Administration

Displays teh Space administration screen

 

spaceattachments

View > Other Pages > Attachments

Displays the attachments index within a Space

2.0.0

spacetemplates

Edit > Administration > Space Templates

Displays the templates within a Space

2.0.0

toggleVisibility

 

Shows or hides a HTML tag (and it's contents) based on it's HTML id (see examples).

 

userspace

 

Displays the users' personal space if they have one, otherwise it displays their personal profile

 

watch

View > This Page > Watch this page/news/space

Toggles email notifications when current page/news/space is changed

 

Third-Party Plugin Link Destinations

The following destinations are used to provide links to features in third-party plugins:

Destination

Suggested Location

Notes

Ver

Plugin

addgliffydiagram

Edit > New > Diagram...

Adds a new Gliffy diagram to a wiki page.

2.0.8

Gliffy

admingliffy

Edit > Admiinstration > Gliffy...

Links to the Gliffy administration screen.

2.0.8

Gliffy

podcastpage

Edit > Podcast Settings...

Configures Podcast settings for a page.

2.0.8

Podcast

podcastnews

Edit > Podcast Settings...

Configures Podcast settings for a blog post (news).

2.0.8

Podcast

podcastchannels

View > Other Pages > Podcasts

Displays Podcast channels screen for a space (which also allows channels to be edited).

2.0.8

Podcast

customusermanagement

Edit > Administration > User Management...

Displays screen for editing the user group associated with current space.

2.0.8

Custom Space User Management

editgridaddbook

Edit > New > Spreadsheet...

Adds a new editable spreadsheet to the page.

2.0.8

Edit Grid

review

Edit > New > Review...

Adds a new review for the current page.

2.0.8

Mark for Review

reviewreport

Edit > Administration > Reviews

Displays review report for the space.

2.0.8

Mark for Review

reviewspaceconfig

Edit > Administration > Review - Space Config

Space-level configuration for Reviews.

2.0.8

Mark for Review

reviewglobalconfig

Edit > Administration > Review - Admin Config

Global configuration for Reviews.

2.0.8

Mark for Review

Examples

Basic use

You can create a link to the dashboard as follows:

{menulink:dashbaord}Go to the dashbaord{menulink}

Links in menus

When you are adding links in menus, wrap them in the menuitem macro:

{menuitem}{menulink:dashbaord}Go to the dashbaord{menulink}{menuitem}

Links to other spaces

You can link to a feature in another space as follows:

{menulink:map|space=wibble}Wibble Site Map{menulink}

This would show the site map in the Space with a key of "wibble", regardless of where you are in your site.

Tooltips and Access Keys

To add tooltips and access keys, use the following notation:

{menulink:newcomment|accesskey=c|tooltip=Add comment}Add a comment...{menulink}

Hiding Inactive Links

If a menulink is not applicable (eg. user doesn't have privilages or the link does not relate to the current location within your site, etc) then the body text of the link will be output unlinked.

For example, if a user does not have comment privileges, then they would see the link shown in the previous example as:

Add a comment...

Obviously, that's not very useful so you want to hide inactive menu links. To do this, use the menuitem macro which will hide it's body content if there are no links in it:

{menuitem:flat=true}{menulink:newcomment}Add a comment...{menulink}{menuitem}

If the body of the menuitem macro doesn't contain a link, it will not be shown.

Link Target

You can open the link destination in a specific frame or window using the target parameter:

{menulink:map|target=_blank}Open site map in new window{menulink}

Which results in:

Unknown macro: {menulink}

Open site map in new window

Toggle the Visibility of an on-screen element

There is a bug in Builder 2.0.1 - please don't use this link destination until further notice as it doesn't work.

You can toggle the visibility of any HTML tag with a unique id using the code below:

{div:id=visdemo}*This is a div tag with id of "visdemo" that you can show or hide using the link below.*{div}

{menulink:toggleVisibility|target=visdemo}Toggle the text above{menulink}

As you can see, the div tag has been given a HTML id - the raw HTML looks like this:

<div id="visdemo"> ... <div>

And the "target" parameter in the menulink macro states what id will be toggled.

The result:

Unknown macro: {div}

This is a div tag with id of "visdemo" that you can show or hide using the link below.

Unknown macro: {menulink}

Toggle the text above

If you want the tag to initially be hidden, use the "display:none" CSS style:

{div:id=visdemo1|style=display:none;}*This is a div tag with id of "visdemo1" that you can show or hide using the link below.*{div}

{menulink:toggleVisibility|target=visdemo1}Show/hide the text above{menulink}

The div tag will now be output with a style attribute like this:

<div id="visdemo1" style="display:none;"> ... <div>

Note that we've changed the id from "visdemo" to "visdemo1" - that's because a HTML id must be unique to the entire web page. If there are two or more occurrences of the same id, the results can be very unpredictable so make sure to use unique id's.

The result (it starts hidden so click the link to see it):

Unknown macro: {div}

This is a div tag with id of "visdemo1" that you can show or hide using the link below.

Unknown macro: {menulink}

Show/hide the text above

Linking to other sites

To add tooltips and access keys, use the following notation:

{menulink:custom|link=http://www.domain.com/path/resource.file}Other{menulink}

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.

  • No labels