Simply way to change many page URLs? | Community
Skip to main content
steveatvisa
Level 2
August 23, 2018
Solved

Simply way to change many page URLs?

  • August 23, 2018
  • 8 replies
  • 3399 views

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!

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 arunpatidar

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)

8 replies

smacdonald2008
Level 10
August 23, 2018

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.

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
August 23, 2018

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
smacdonald2008
Level 10
August 23, 2018

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

steveatvisa
Level 2
August 23, 2018

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.

steveatvisa
Level 2
August 23, 2018

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

arunpatidar
Community Advisor
Community Advisor
August 23, 2018

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
steveatvisa
Level 2
August 23, 2018

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

arunpatidar
Community Advisor
Community Advisor
August 24, 2018

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