The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Display link of the current page - macro

Raduz
Contributor
June 16, 2020

Hi all,

I just want to share this simple macro for those who need it (e.g. for new template, ...). Feel free to edit and share it. :-)

## Macro name: current-page-link
## Macro title: Current page link
## Macro has a body: No
## Body processing: No macro body
## Description: Create a link with the name of the current page
##
## Developed by: Raduz Sedlar
## Date created: 16.06.2020

## @noparams

## Short link of current page (using name of the page as a link)
<ac:link>$action.getGlobalSettings().getBaseUrl()$content.getUrlPath()

## Full link (display full confluence page link)
## <ac:link>
## <ac:plain-text-link-body><![CDATA[$action.getGlobalSettings().getBaseUrl()$content.getUrlPath()]]></ac:plain-text-link-body>
## </ac:link>

 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Raduz
Contributor
December 11, 2022

Hi Markisio,

 

you must create custom macro under Admin section of Confluence and then apply it on page you want.

0 votes
Markisio
Contributor
December 10, 2022

how to insert the code above ? any examples. 

0 votes
Miguel Jesus _Team Files_
Atlassian Partner
June 18, 2020

This is great! Thanks Raduz. 

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events