Add page path with ID in an AEM List Component using Fixed List | Community
Skip to main content
February 27, 2024
Solved

Add page path with ID in an AEM List Component using Fixed List

  • February 27, 2024
  • 2 replies
  • 1080 views

Hi Everyone,

I'm trying to add the page path with ID in a list component using fixed list but after saving the change, the link is getting removed from the list.

 

Example :- if I authored 
/content/site/country/language/pagename#dummy
it is getting removed

 

I know that the core component’s list model class is filtering out all such paths but is there any way to fixed this issue?

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 Imran__Khan

@rajesh_kumarba @Yes, it will require to overlay the List componen. Copy OOTB model in you core folder and update required code for not to have resolver.map() which will allow us to have /id in url.

2 replies

Imran__Khan
Community Advisor
Community Advisor
February 27, 2024

@rajesh_kumarba It check for the valid link with map and than save to crx/de. Please create custom sling model for your use case referring OOTB sling model

https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v4/ListImpl.java

OR

you can add ID as /content/site/country/language/pagename/#dummy or /content/site/country/language/pagename?id=dummy

March 2, 2024

@imran__khan 

the authoring trick didn't work,

but is there any way I can override the isExternalLink method of LinkManagerImpl class
https://github.com/adobe/aem-core-wcm-components/blob/release/2.22.10/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/link/LinkManagerImpl.java

 

if I can categorize "/content/site/country/language/pcagename#dummy" as an external URL it will work fine

Imran__Khan
Community Advisor
Imran__KhanCommunity AdvisorAccepted solution
Community Advisor
March 3, 2024

@rajesh_kumarba @Yes, it will require to overlay the List componen. Copy OOTB model in you core folder and update required code for not to have resolver.map() which will allow us to have /id in url.

kautuk_sahni
Community Manager
Community Manager
February 28, 2024

@rajesh_kumarba Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni