Hi All,
I am working on moving a page from one location to an another via Page Manager API.
move(Page page, String destination, String beforeName, boolean shallow, boolean resolveConflict, String[] adjustRefs,String[] publishRefs) |
In above method of page manager, how to get value for adjustRefs & publishRefs ?
Do we have any predefined function to get the pages which are refered to currentPage ?
Thanks,
Naveen
Solved! Go to Solution.
Here is the way to find our resources acs-aem-commons/PagesReferenceProvider.java at master · Adobe-Consulting-Services/acs-aem-commons · ...
~kautuk
Looking through the JavaDocs for this API - i do not see any method that returns this data.
Here are some API examples for this API - Examples of com.day.cq.wcm.api.PageManager | massapi.com
Views
Replies
Total Likes
HI Naveen
- Pass a String array which contains array of all the page paths that references this Page .
For example /content/page1 needs to be moved to /content/test/page1 ; Pages /content/Page2 and /content/Page3 has a reference /content/page1 in them , then you should give an array below paths as the parameter adjustRefs
{"/content/Page2" , "/content/Page3"}
Views
Replies
Total Likes
I have not tested this , but please let me know if there is any difference
Views
Replies
Total Likes
Hi Veena,
Thanks for your cmts but my question is how do we know that page2 and page3 has referred page1? How do we know the moved pages is refered in some pages and how we get these pages?
Views
Replies
Total Likes
Here is the way to find our resources acs-aem-commons/PagesReferenceProvider.java at master · Adobe-Consulting-Services/acs-aem-commons · ...
~kautuk
For that you can use node/resource iteration starting form /content or yo also go for query if the content size is small.
Awesome Kautuk.. You found that .. This will help naveeng73207107
Thanks, Kautuk & Veena.. I will use that code and check it will fulfill my requirement.
Views
Replies
Total Likes
Does this solution work? ACS AEM Commons page reference provided provides the references of a resource of the current page. It doesn't provide the pages where the current page is referenced. I believe "move" method accepts the pages where the current page is reference.
Please do let me know if the ACS AEM Commons Page Reference provided actually works in this scenario.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies