Is there any equivalent variable of @self(The current space) for the page.

I want to be able to use the content by label macro specifiy that the ancestor id as the page itself.

I can manually do this per macro by typing in the name of the page but I want to put the macro in a template and not have to edit the field each time. I know @self is reserved for the space a page exists within but is there an equivalent variable for the a page?

4 answers

Not yet, please vote for this issue: https://jira.atlassian.com/browse/CONF-39340

It doesn't seem like this is possible (there's no reference to the current page in CQL), but if you don't type but instead click in the field for ancestors, doesn't the page you are editing pop up as the first option?

Managed to do with the following user macro:

## Body Processing: No macro body
## @param CQL:title=CQL|type=string|required=false|desc=CQL to filter children with
## @param firstcolumn:title=firstcolumn|type=string|required=false|desc=Title of first column
## @param headings:title=headings|type=string|required=false|desc=Columns to display

 

<ac:structured-macro ac:name="detailssummary" ac:schema-version="2">
    <ac:parameter ac:name="sortBy">title</ac:parameter>
    <ac:parameter ac:name="cql">$paramCQL and ancestor = "$content.getIdAsString()"</ac:parameter>
    <ac:parameter ac:name="firstcolumn">$paramfirstcolumn</ac:parameter>
    <ac:parameter ac:name="headings">$paramheadings</ac:parameter>
</ac:structured-macro>

(Thanks to James Garratt - https://jira.atlassian.com/browse/CONF-38701)

This doesn't help people who are using the Cloud version and can't create custom macros.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,041 views 2 13
Read article

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