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 edited

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

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. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events