Content path in pathfield/pathbrowser is not working in AEM Publish although content path valid | Community
Skip to main content
samsundar23
New Participant
September 30, 2020
Solved

Content path in pathfield/pathbrowser is not working in AEM Publish although content path valid

  • September 30, 2020
  • 2 replies
  • 7538 views

Im authoring the content path in pathfield in my author instance which is a valid content path.
After publishing, in publish instance its not rendering to that html content page after I click the link.
When I observed its due to the .html is not appending in the content path.

  • I don't want to add .html in my component as we have huge number of components to change.
  • I want to handle in AEM itself and I don't want to use apache rewrite url to append .html.
  • I have gone through etc/map but I'm not sure how to use it to perform the .html getting appended in the content path.

Kindly pour in your thoughts. I need some quick fix for this to work.

Thanks

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 Jineet_Vora

Hello @samsundar23,

You can do the following to achieve this:
Create a mapping in /etc/map/http of your AEM publish with below node and properties:

 

This will ensure it will work with both paths with .html extension and paths without .html extension.

Jineet

2 replies

samsundar23
New Participant
October 5, 2020

Thanks @jineet_vora for all your recommendations.

Jineet_Vora
Jineet_VoraAccepted solution
New Participant
September 30, 2020

Hello @samsundar23,

You can do the following to achieve this:
Create a mapping in /etc/map/http of your AEM publish with below node and properties:

 

This will ensure it will work with both paths with .html extension and paths without .html extension.

Jineet

samsundar23
New Participant
September 30, 2020

Hi @8244636 ,

Thanks for the info.

With or without the html the content is coming up.

 

My requirement is to append .html after moving to the corresponding page on clicking the pathfield link.

For instance, If I have authored /content/xxx-bbb/bunk/about-us in pathfield and 

I should be moving to /content/xxx-bbb/bunk/about-us.html in my publish instance.

 

Is there any way to append .html as well using the etc/map option which you have suggested ?

Please help.

 

Thanks

SHYAMSUNDAR TK