html extension for page links | Community
Skip to main content
sreenu539
New Participant
February 2, 2023
Solved

html extension for page links

  • February 2, 2023
  • 1 reply
  • 1838 views

hi ,

 

I supertyped List component and created a new component with new option "Custom List".

 

Out of the box "fixed list" links have ".html" extension, where as custom option, model I created does not generate ".html" extension.

 

Question: what is the best way to generate .html extension (Is it using Externalizer ? but it doesn't seem to generate .html extension )

 

NOTE:

I have some external URLs such as https://somesite.com/financial-information/quarterly-results

which should not get .html extension but only pages /content/myaemsite pages should get .html extension

 

Do I need to write any linktransformer implementation and rewriter osgi config ?

 

I tried to look into https://github.com/adobe/aem-core-wcm-components/blob/d3d89a177d9a5095a648484a1b00d2046e73ce27/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/link/LinkManagerImpl.java

to see how aem core components doing but could not get to the bottom of it.

 

 

 

 

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 Lokesh_Vajrala

Do I need to write any linktransformer implementation and rewriter osgi config ?


Yes, you can go with transformer and rewriter config approach if you think the LinkBuilder Implementation is not working for your use-case. 

 

 

 

1 reply

Lokesh_Vajrala
New Participant
February 2, 2023

Hi @sreenu539,

 

Please check this class & method in WCM Core module - https://github.com/adobe/aem-core-wcm-components/blob/d3d89a177d9a5095a648484a1b00d2046e73ce27/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/link/LinkBuilderImpl.java#L250 

 

You can use the LinkBuilder implementation to generate the link with html extension.  

sreenu539
sreenu539Author
New Participant
February 2, 2023

I have some external URLs such as https://somesite.com/financial-information/quarterly-results

which should not get .html extension but only pages /content/myaemsite pages should get .html extension

 

 

sreenu539
sreenu539Author
New Participant
February 2, 2023

Do I need to write any linktransformer implementation and rewriter osgi config ?