Seems quite simple but can't figure it out. How do you get the page id for the parent page?
I can't seem to find anything relevant in the API docs that explains how/if this is possible.
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)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.