Link Page Name By Macro

Problem: I want to create a dynamic link to the current page based on the title of the current page.

I had our confluence admin create the macro which I found at:

This seems to work once, however, when the link is rendered it shows up with at + but then does link to the page properly when clicked.

The problem is when the page is edited, the text [{pagename}] has been replaced with:

&linkCreation=true&fromPageId=38176348" class="createlink"linktype="raw" wikidestination="{pagename}
" originalalias="{pagename}
" >{pagename}

Anyone have an idea?

1 answer

This widget could not be displayed.

You could use report-info... something like:


Let's say you wanted to use the title of the parent page as a prefix, you could do something like:

[{report-info:page:parent > page:title} Your Wiki Suffix]

I recently coded up a navigation bar that allowed somone to "click" to create sub sections within a project area using the reporting macro in conjunction with the add-page macro to attempt to push naming consistancy within a project. For each subsection within a project, I had the following code (edited for the specific section):

{report-list}{local-reporter:page:parent > content:children} {content-filter:@self|labels=+fy12_actions} {local-reporter}{report-body}{report-link}Action Items{report-link}{report-body}{report-empty}{add-page:allowRename=true|template=FY12 Project Actions|live=true|name=%content:title% Action Items|parent=@parent}Action Items{add-page}\\{report-empty}{report-list}

Hopefully that gives you some ideas...


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

202 views 2 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you