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/bundl...
to see how aem core components doing but could not get to the bottom of it.
Solved! Go to Solution.
Views
Replies
Total Likes
Yes, you can go with transformer and rewriter config approach if you think the LinkBuilder Implementation is not working for your use-case.
Hi @sreenu539,
Please check this class & method in WCM Core module - https://github.com/adobe/aem-core-wcm-components/blob/d3d89a177d9a5095a648484a1b00d2046e73ce27/bundl...
You can use the LinkBuilder implementation to generate the link with html extension.
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 ?
Yes, you can go with transformer and rewriter config approach if you think the LinkBuilder Implementation is not working for your use-case.
If you check lines #146 && #147 in the LinkBuilderImpl class, the code checks if it is a page in AEM, then attempts to resolve the link and adds the HTML extension. In the case of external URLs, I believe it returns the link without any extension, but you could test it quickly to confirm it suites your case.
make sense for single use case / for this component.
Views
Like
Replies