move method of Page Manager API | Community
Skip to main content
Level 2
November 22, 2017
Solved

move method of Page Manager API

  • November 22, 2017
  • 9 replies
  • 7537 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Here is the way to find our resources acs-aem-commons/PagesReferenceProvider.java at master · Adobe-Consulting-Services/acs-aem-commons · GitHub

~kautuk

9 replies

smacdonald2008
Level 10
November 22, 2017

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

VeenaVikraman
Community Advisor
Community Advisor
November 23, 2017

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"}

Nikash_Bahadur
Adobe Employee
Adobe Employee
January 6, 2020
Is there an api method to get all the page paths that reference this page? How did you do it? Did you use jcr query?
VeenaVikraman
Community Advisor
Community Advisor
November 23, 2017

I have not tested this , but please let me know if there is any difference

Level 2
November 23, 2017

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?

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
November 23, 2017
manoj_devapath
Level 5
November 23, 2017

For that you can use node/resource iteration starting form /content or yo also go for query if the content size is small.

VeenaVikraman
Community Advisor
Community Advisor
November 23, 2017

Awesome Kautuk.. You found that .. This will help naveeng73207107

Level 2
November 24, 2017

Thanks, Kautuk & Veena.. I will use that code and check it will fulfill my requirement.

Nikash_Bahadur
Adobe Employee
Adobe Employee
January 6, 2020

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.