Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Simply way to change many page URLs?

Avatar

Level 2

Hi, we need to change a product name within a URL, e.g.  OLD-product-name.html to NEW-product-name.html. We have a lot of nodes and it looks like we need to manually edit and re-publish hundreds of files. Apparently we can't roll out the changes - we have to edit each node separately. Is there a simple built-in method, script or batch that can accomplish the task and keep the inheritances in AEM 6.3? Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

This can be achieved by doing Page Move, once page move/rename is done new page will be published and old page deactivate automatically.

Creating and Organizing Pages

Though you can automate by creating utility/servlet and do page move using PageManager API or JCR Session API.

PageManager ("The Adobe AEM Quickstart and Web Application.") 

Session (Content Repository for Java Technology API Version 2.0)



Arun Patidar

View solution in original post

8 Replies

Avatar

Level 10

This may be possible working with the PageManager API. There are methods that let you modify pages. I have never tried using this API to change page names - but something you can look into.

Avatar

Correct answer by
Community Advisor

Hi,

This can be achieved by doing Page Move, once page move/rename is done new page will be published and old page deactivate automatically.

Creating and Organizing Pages

Though you can automate by creating utility/servlet and do page move using PageManager API or JCR Session API.

PageManager ("The Adobe AEM Quickstart and Web Application.") 

Session (Content Repository for Java Technology API Version 2.0)



Arun Patidar

Avatar

Level 10

That is exactly what i was thinking. This use case may make a really good HELPX article.

Avatar

Level 2

I'm kind of a newbie so I wouldn't recognize the correct answer. I will pass your suggestions along to our IT team. Thanks for your help, please let me know if you have any more recommendations on this topic.

Avatar

Level 2

Arun, would that method allow us to change many files across different nodes? Or would we edit each file individually?

Avatar

Community Advisor

Hi,

With the help of APIs you can change many nodes in a one go. But it is depends how your content is structured and what would be the criteria to filter out pages programatically which needs to be renamed.



Arun Patidar

Avatar

Level 2

Translations may be an issue. Thanks again for your help!

Avatar

Community Advisor

Hi Scott,

I've written a sample servlet to rename a page using PageManager API.

aem63app-repo/MovePageServlet.java at master · arunpatidar02/aem63app-repo · GitHub



Arun Patidar