How to display the PAGE ID in a Confluence Page through Macro.

Siddheshwar mhetre
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.
August 10, 2014

I want to display the Page ID with the User MACRO.

http://confluence.atlassian.com/pages/editpage.action?pageId=135922

Page ID= 135922.

So In page will display his own ID.

Page ID should display in its own page.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Guilherme Nedel [Atlassian]
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2014

Hello Siddheshwar, I have tested the steps outlined in this knowledgebase article - Show the content ID (page ID) in a page - and was able to retrieve the ID into the page using it.

Siddheshwar mhetre
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.
August 11, 2014

Hello Guilherme,

Thanks...:) It is working..

cheers,

Siddheshwar.

Lana Wright January 6, 2016

@Guilherme Nedel [Atlassian] Similar to this original request, I would like to use the page/content ID in my user macro (the end goal of which is to create an Export to PDF button). However, rather than simply displaying the ID on the page, I would like it to be appended to a link. Here's a really basic (obviously not working) version of my macro: ## @noparams <a href="https://confluence.x.com/spaces/flyingpdf/pdfpageexport.action?pageId="; + $content.getIdAsString()> <button class="aui-button aui-button-primary">Export to PDF</button> </a>

Christopher Rudolph October 12, 2018

Dear Lana,

did you find a way to display the page ID e.g. in the header for the PDF export? 

1 vote
Evangelos Mantadakis April 10, 2018

Hello @Siddheshwar mhetre,

For the Confluence Cloud, anew plugin was created for displaying the page ID . QC Documents for Confluence Cloud  .

TAGS
AUG Leaders

Atlassian Community Events