Expand my Community achievements bar.

customization in Apache Sling sitemap not Working

Avatar

Level 4

Following below few blogs working as expected with OOTB but when trying to customize the attribute not working as expected.

 

https://www.theaemmaven.com/post/aem-apache-sling-sitemap

https://aemsimplifiedbynikhil.wordpress.com/2021/12/01/extending-the-apache-sling-sitemap-generator-...

 

I am using the AEM 6.5 with Serivce pack 6.5.12.0.

Kindly please let me know what I am missing any kind of configuration missing plz help here.

 

 

9 Replies

Avatar

Community Advisor

Can you elaborate on what you mean by 'the attributes do not work as expected'? I have followed this resource in the past, and everything was okay: https://www.theaemmaven.com/post/aem-apache-sling-sitemap. Please take the time to carefully read the notes and disclaimers provided in the article.



Esteban Bustamante

Avatar

Level 4

Hi @EstebanBustamante 

for customization used the below code but it still its not calling the extended one it is calling the OOTB one

 

url.setLastModified(lastmod.toInstant());(displaying)
url.setPriority(2);(not displaying)

When i check error.log  no info i can get related to this extended class.

Avatar

Community Advisor

The article I shared clearly indicates that you must add a higher ranking number so your new sitemap takes precedence over the OOTB. Please read carefully the resources provided in this thread and review your implementation.

EstebanBustamante_0-1698842996659.png

 



Esteban Bustamante

Avatar

Level 4

Hi @EstebanBustamante I removed the ranking and added in Include Generators correct me if this is the correct way of doing it.

dillipJ98390536_0-1698844366192.png

 

Avatar

Community Advisor

@djohn98390536  how did you do the customisation seems you are missing some thing. I tried this in local and it was working fine 

Avatar

Level 4

Hi @Jagadeesh_Prakash 

for customization used the below code but it still its not calling the extended one it is calling the OOTB one

 

url.setLastModified(lastmod.toInstant());(displaying)
url.setPriority(2);(not displaying)

When i check error.log  no info i can get related to this extended class.

Avatar

Administrator

@djohn98390536 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

Avatar

Level 4

Hi @kautuk_sahni issue is still there .If you can provide some info that will be helpful

 

Thanks