[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h1. \{menulink} Macro

h2. Description

This macro {excerpt}creates a link to a specific Confluence feature{excerpt} 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]).

h2. Usage

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

h2. Parameters

||Property||Required||Default||Notes||
||_default_|(/)| |The destination to link to (see list below)|
||space|(x)|_current space_|Optionally set the space to which the link relates.|
||tooltip|(x)| |The tooltip to display when the mouse hovers over the link (max: 77 chars for cross-platform compatibility){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.{footnote}|
||accesskey|(x)| |An optional shortcut key for the link which can be any alphanumeric character{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.{footnote}|
||target|(x)|_current browser window_|An optional target window or frame in which to load the link destination.|
||class|(x)| |Optional HTML classes to associated with the hyperlink.|

{display-footnotes}

h2. Link Destinations

The following destinations are currently supported by this macro:

||Destination||Default Location||Notes||
||dashboardadvanced|ViewEdit > Other PagesAdministration > Dashbaord|Site dashboardAdvanced|Displays the "advanced" screen|
||normalViewchildren|View > This Page > Normal view|The normal view of Show Children|If a page. Whenhas viewingchild attachmentspages, info, etc., on pages and blogs, this will take you to the actual page viewthis option allows the user to toggle their display|
||printableViewcomments|View > ThisShow PageComments|If >a Printablepage 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.|
||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|
||exportWordhas comments, this option allows the user to toggle their display|
||configuretheme|Edit > Administration > Configure Theme|Displays the theme configuration page|
||copy|Edit > Copy this Page...|Creates an editable copy of a page (and optionally copies over it's children)|
||dashboard|View > Other Pages > Dashbaord|Site dashboard|
||edit|Edit > Edit this Page/News...|Edits the current page or news item|
||exportMail|View > This Page > Export to MicrosoftWiki WordPage|ExportsWhen viewing thea pagemail (andmessage in somethe versionsarchive, ofthis Confluence,will aexport blogthat post)message to a Word document new, editable wiki page|
||exportMailexportPDF|View > This Page > Export to Adobe WikiAcrobat Page(PDF)|WhenExports viewingthe a mail messagepage (and in thesome archive,versions thisof willConfluence, exporta thatblog messagepost) to a new, editable wiki page|PDF file|
||informationexportWord|View > This Page > Page Information|Displays information for a page orExport to Microsoft Word|Exports the page (and in some versions of Confluence, a blog post) to a Word document|
||homefavourite|View > OtherThis PagesPage > HomeAdd/remove Pagefavourite|IfAdds usedor withinremoves athe 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)|
||news|View > Other Pages > News|Displays the recent news within a Space|
||recent|View > Other Pages > Recent Updates|Displays the list of recent updates within a Space|
||RSS|View > Other Pages > RSS Feed Builder|Displays the RSS Feed Buildercurrent page/news/space to or from personal favourites|
||globaltemplates|Edit > Administration > Global Templates|Displays the global templates|
||history|View > Account > History|Displays the history of visited pages, for the current user, in a new window|
||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)|
||index|View > Other Pages > Index|Displays the alphabetical index of content in a Space|
||mapinformation|View > OtherThis PagesPage > SitePage MapInformation|Displays theinformation treefor viewa ofpage hierarchicalor pages (with current page selected if applicable) within a Spaceblog post|
||labels|View > Other Pages > Labels|Displays the labels within a space or global labels if used outside a Space|
||spaceattchmentslogin|View > Other PagesAccount > AttachmentsLogin|DisplaysIf the attachments index within a Space user is logged out, this will take them to the login screen|
||signuplogout|View > Account > Sign-upLogout|DisplaysIf the user is sign-up screen (if public sign-up is enabled in General Configuration)logged in, this will take them to the logout screen|
||historymail|View > Account > History|Displays the history of visited pages, for the current user, in a new windowMail|If a Space has mail in it's mail archive, this will display the mail archive|
||logoutmap|View > Other AccountPages > LogoutSite Map|IfDisplays the usertree isview loggedof in,hierarchical thispages will(with takecurrent thempage toselected theif logout screenapplicable) within a Space|
||loginnewcomment|ViewEdit > AccountNew > Login|If the user is logged out, this will take them to the login screenComment...|Creates a new comment on a page or news item (blog post) within a Space|
||profilenewnews|ViewEdit > AccountNew > Preferences: <name>|If the user is logged in, this will take them to their personal profile screenNews...|Creates a new news item (blog post) within a Space|
||mail|Viewnewpage|Edit > New > Mail|IfPage...|Creates a Spacenew haspage mailwithin in it's mail archive, this will display the mail archivea Space|
||newspace|Edit > New > Space...|Creates a new Space|
||childrennews|View > Show Children|If a page has child pages, this option allows the user to toggle their displayOther Pages > News|Displays the recent news within a Space|
||commentsnormalView|View > This Page > ShowNormal Comments|Ifview|The normal view of a page. When hasviewing commentsattachments, this option allows the user to toggle their displayinfo, etc., on pages and blogs, this will take you to the actual page view|
||newpagepageattachments|Edit > Attachments|Displays Newthe > Page...|Createsattachments for a new page withinor anews Spaceitem|
||newnewsprintableView|EditView > This NewPage > News...|Creates a new news item (blog post) within a Space|
||newspace|Edit > New > Space...|Creates a new Space|
||newcomment|Edit > New > Comment...|Creates a new comment on a page or news item (blog post) within a Space|
||edit|Edit > Edit this Page/News...|Edits the current page or news itemPrintable 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.|
||profile|View > Account > Preferences: <name>|If the user is logged in, this will take them to their personal profile screen|
||recent|View > Other Pages > Recent Updates|Displays the list of recent updates within a Space|
||remove|Edit > Remove this Page/News...|Deletes (after confirmation) the current page or news item|
||copyRSS|EditView > Copy this Page...|Creates an editable copy of a page (and optionally copies over it's children)|
||pageattachments|Edit > AttachmentsOther Pages > RSS Feed Builder|Displays the attachmentsRSS for a page or news itemFeed Builder|
||search|spacetemplates|Edit > Administration > Space Templates|Displays |Links to the search screen (defaulting to searching the templatescurrent withinspace awhere Spaceapplicable).|
||globaltemplatessignup|EditView > AdministrationAccount > Global TemplatesSign-up|Displays the global templates|
||configuretheme|Edit > Administration > Configure Theme|Displays the theme configuration pageuser sign-up screen (if public sign-up is enabled in General Configuration)|
||advancedsiteadmin|Edit > Administration > AdvancedSite Administration|Displays the "advanced"Administration screenConsole|
||spaceadmin|Edit > Administration > Space Administration|Displays teh Space administration screen|
||siteadminspaceattchments|EditView > Other AdministrationPages > Site AdministrationAttachments|Displays the Administration Consoleattachments index within a Space|
||favouritespacetemplates|ViewEdit > This PageAdministration > Add/removeSpace favouriteTemplates|AddsDisplays or removes the current page/news/space to or from personal favouritestemplates within a Space|
||watch|View > This Page > Watch this page/news/space|Toggles email notifications when current page/news/space is changed|
||search| |Links to the search screen (defaulting to searching the current space where applicable).|
||userspace| |Links to the current users' personal space|

h2. Examples

h3. Basic use
{quote}
You can create a link to the dashboard as follows:

{code}
{menulink:dashbaord}Go to the dashbaord{menulink}
{code}
{quote}
h3. Links in menus
{quote}
When you are adding links in menus, wrap them in the [menuitem macro]:

{code}
{menuitem}{menulink:dashbaord}Go to the dashbaord{menulink}{menuitem}
{code}
{quote}
h3. Links to other spaces
{quote}
You can link to a feature in another space as follows:

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

This would show the site map in the Space with a key of "wibble", regardless of where you are in your site.
{quote}
h3. Tooltips and Access Keys
{quote}
To add tooltips and access keys, use the following notation:

{code}
{menulink:newcomment|accesskey=c|tooltip=Add comment}Add a comment...{menulink}
{code}
{quote}
h3. Hiding Inactive Links
{quote}
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:

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

If the body of the [menuitem macro] doesn't contain a link, it will not be shown.
{quote}
h3. Link Target
{quote}
You can open the link destination in a specific frame or window using the ??target?? parameter:

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

Which results in: {menulink:map|target=_blank}Open site map in new window{menulink}
{quote}
h2. 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:

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

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.