Forums

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

[CONF] Get ID for parent page?

Steve Goldberg
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.
July 31, 2013

Seems quite simple but can't figure it out. How do you get the page id for the parent page?

  • I know you can do $content.getIdAsString() to get the current page's ID.
  • I know you can do $content.getParent() to get the parent page.
  • But $content.getParent().getIdAsString() seems to do nothing.

I can't seem to find anything relevant in the API docs that explains how/if this is possible.

1 answer

0 votes
Matthew J. Horn
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.
July 31, 2013

What version of Confluence are you using? This worked for me, which is exactly what you tried.

$content.getParent().getIdAsString()

Maybe you're running the macro on the root page of the space (so it has no parent)?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, AI, meeting recording, community

[NEW] Record your meetings with Loom

Welcome to great meetings, with less work. Automatically record, summarize, and share instant recaps of your meetings with Loom AI.

Learn more
AUG Leaders

Atlassian Community Events