The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to get Page ID in Macro Editor Dialog

bill chef
July 5, 2020

Hi. 

 

I tried to run below code in Macro Editor Dialog for getting pageID

AP.context.getContext(function(response){
  console.log("Jira Issue Key", response.issue_key);
  console.log("Confluence page id", response.pageId);
  console.log("license status", response.license);
});

 

unfortunately, variable "response " not contain value.

response.pageId is not defined ....

 

How to get Page ID in Macro Editor Dialog ???

help, please

 

Thank you

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
bill chef
July 6, 2020
 AP.navigator.getLocation(function (location) {  
//console.log(location)                
// location will be:                
// {               
//   "target": "contentview",                
//   "context": {               
//     "contentId": 1234,                
//     "contentType": "page",                
//     "spaceKey": "DS"                
//   }                
// }
});

 

context.contentId  is page ID

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events