Create a link with the name of the current page included

I want to create a template with a set of links to sub pages. The sub pages must have the name of the page created with the template.This will be something like this
The page pagexyz is created with the template

pagexyz\pagexyz - clients
pagexyz\pagexyz - software
pagexyz\pagexyz - providers
pagexyz\pagexyz - etc


I tried to do this with user macros the macro is displayed as text.

[$content.getTitle() - software]
[pagexyz - clients]


2 answers

0 vote
Davin Studer Community Champion Nov 06, 2015

Would the children macro work for you? Another thought would be to label the subpages that you would like to appear and use the content by label macro. If you have 5.8 then the content by label macro also allows you to define an ancestor so you could limit it to a certain branch.

I got what i want now. First i created this User Macro:

## @param Name:title=Name|type=string|required=true|desc=Page name

    <ri:page ri:content-title="$content.getTitle() - $paramName"/>
    <ac:plain-text-link-body><![CDATA[$content.getTitle() - $paramName]]></ac:plain-text-link-body>

This did what i first intended. This i realized i also want the pages to be created with a specific template. So i found the Servicerocket Linking plug-in. I use this with the Servicerocket Suppliers plug-in for the prefix page name content.

I use the link-page macro of the linking plugin. This creates a link that checks if a page is available or not. If not it can create a page with a template specified.




Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,799 views 26 10
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