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

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events