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

Saurabh Katiyar September 22, 2015

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

1 vote
Anne EQS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2015

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)

1 vote
Anne EQS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2015

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

0 votes
Deleted user July 24, 2017

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

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2015

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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events