Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to display Page ID in footer of page

Michelle Frese October 5, 2017

Hi,

I would like to insert a user macro to allow the page ID to be displayed on the footer of the page. 

I know very little about writing a macro, so if anyone can assist it would be appreciated.

 

Thanks,

Michelle

1 answer

0 votes
Thomas Schlegel
Community Champion
October 6, 2017

Hi Michelle,

there was a similar question I answered not long ago. Please hava a look here: 

https://community.atlassian.com/t5/Confluence-questions/Get-display-Page-ID-Confluence-Internal-Code/qaq-p/636638#M85459

When you have created your macro, you are able to put it with the space tools to the footer: http://<your confluence-url>/spaces/custompagecontent.action?key=<your spacekey>

If you have any further questions, don't hesitate to ask!

Michelle Frese October 6, 2017

Hi Thomas,

Thanks for your help. I created the Page ID macro as so:

## Macro title: getpageid
## Macro has a body: N

## @noparams

$content.getIdAsString()

I added it as a user macro.

 

However,

I am having trouble having it displayed correctly in the footer.

I went to the space I want the page ID displayed. I went to the space tools, then footer, but not sure exactly what I am supposed to insert into the footer box.

-I tried inserting the macro itself

- I tried inserting Marco name "PageID"

Whatever , I insert into the footer, that is what is displayed, not the Page ID.

Can you tell me what I am doing wrong? I would like for every page of a specific space to have the page ID footer.

Thanks,

Michelle

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events