cancel
Showing results for 
Search instead for 
Did you mean: 

sitemap customise loc tag under sitemapindex

Former Member
0 Kudos
569

sitemap.xml is being generated OOTB upon running sitemap cron job as below :

 <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
     <sitemap>
     <loc>
     http://localhost:9001/medias/sys_master/h5d/h41/8815435350046/Homepage-en-INR-249608667196545257_Hom...
     </loc>
     </sitemap>
     <sitemap>
     <loc>
     http://localhost:9001/medias/sys_master/h59/h50/8815435481118/Product-en-INR-2083446086458108136_Pro...
     </loc>
     </sitemap>
     <sitemap>
 </sitemap>
 
   
 
     </sitemapindex>
 

How do we customize the generation of tag under ?

View Entire Topic
0 Kudos

You will need to extend ProductModelToSiteMapUrlDataPopulator.java and configure your url resolver like below

 <alias name="extendedDefaultProductModelToSiteMapUrlDataPopulator" alias="productModelToSiteMapUrlDataPopulator"/>
         <bean id="extendedDefaultProductModelToSiteMapUrlDataPopulator" class="de.hybris.platform.acceleratorservices.sitemap.populators.ProductModelToSiteMapUrlDataPopulator">
             <property name="urlResolver" ref="hcProductModelUrlResolver"/>
         </bean>

You might also want to check the property website.[siteid].http or website.[siteid].https is configured or not.