we have product pages rendering dynamically from external , without the physical page actually present in aem ex:/content/wknd/us/en/products is the existing page but our product pages will be generated with suffix without actually having the pages in aem. is there a way to extend the ootb sitemap functionality to include these dynamic urls using custom code
Hi @pradeep8910 ,
If you want to include external URL in your sitemap then one approach I'd suggest is that mention all these URLs in a file.
Then upload this file in DAM.
Now in your custom code you can read this file asset and show the external URLs in sitemap.
Thanks
Tarun
hi @TarunKumar
how do i extend the OOTB sitemap functionality to read the references from the upload asset, so that my OOTB functionality still works butthe dynamic urls are added to the sitemap
Hi @pradeep8910
Here is the example to extend sitemap
Hi @pradeep8910 ,
Yes, you can extend the Out-of-the-Box (OOTB) sitemap functionality in Adobe Experience Manager (AEM) to include dynamic URLs generated from external sources. Here's a general approach you can take:
Custom Sitemap Generation Component: Develop a custom component or service to generate the sitemap. This component will need to fetch the dynamic URLs from your external source and include them in the sitemap XML.
Integration with External Source: Implement a mechanism to fetch the dynamic URLs from your external source. This could involve using HTTP requests, APIs, or any other suitable method to retrieve the URLs.
XML Generation: Once you have the dynamic URLs, you need to format them into XML according to the sitemap protocol. You can use Java libraries like JAXB or Apache Sling Models to help with XML generation.
Sitemap Configuration: Configure AEM to use your custom sitemap generation component instead of the OOTB one. This typically involves configuring a servlet or a job to trigger the generation of the sitemap XML.
Scheduled Generation: Schedule the sitemap generation job to run periodically to keep the sitemap up-to-date with any changes in the dynamic URLs.
By following these steps, you can extend the OOTB sitemap functionality in AEM to include dynamic URLs from external sources. Keep in mind that you'll need appropriate permissions to develop and deploy custom code in your AEM instance.
There is no out-of-the-box (OOTB) functionality in AEM to generate a sitemap for dynamic pages that are not physically present in the repository. However, you can extend the existing sitemap functionality by implementing a custom sitemap generator.
Agreed OOTB I don’t see an option but extending might help. However have these urls embedded within robots would help along with existing?
@pradeep8910 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.
Views
Replies
Total Likes
For a project, we used the default sitemap which generated URLs for dynamic PDP (Product Detail Pages)
Views
Replies
Total Likes
Views
Likes
Replies