0
votes

I'm working in an AEM project and part of development we are accessing the content using http://localhost:4502/editor.html/content/xyz/en/app.html.

While navigating to another page it is redirecting me to http://localhost:4502/editor.html/content/xyz/en/inko-app (observe carefully the link is without .html extension) and in order to see the new webpage I had to add .html extension manually.

Is there anyway I can automate this only for development environment?

Versions used:
AEM: 6.3
build version :20170420

I have gone through Adding .html extension to page selected but it is not quite useful

1
The AEM default behaviour is to access pages with .html always. So your project seems to have configs or code that prevents this. I guess you are in preview mode?Oliver Gebert
Yes, indeed, I am in Author mode and want to navigate in between pages without publisher instanceGangadhar JANNU
Sure, but - just to get things right on my end - are you in edit mode or iin preview mode on your author instance? I am asking because links should not be clickable if you open a page in edit mode. Can you check if there really is a redirect or if the link is pointing directly to the target url (without suffix)?Oliver Gebert
Yes, I'm in a preview mode. Link is pointing directly to the target url without suffixGangadhar JANNU
@GangadharJannu, of course you can do, have you thought of writing Sling rewriter which will be applicable to development server?Pakira

1 Answers

-1
votes

Can you check if in your sightly or java where you are declaring the page path, have you added .html as extension or not?.

For exmaple :

In your sightly if you are getting page path as "${currentPage.path}", the value will be without html, you need to explicitly add .html to "${currentPage.path}.html" like this.