We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5901
    • 11 Posts
    Hi Everyone,

    Coming back to my issue in past posts, I am still having a couple of problems with the Sitemap XML tutorial.

    I have the following code in my TPL:

    <url>      
      <loc>[[++site_url]][[~[[+id]]~]]</loc>
      <lastmod>[[+editedon]]</lastmod>
      <priority>[[+tv.XMLSitemapPriority]]</priority>
      <changefreq>[[+tv.XMLSitemapChangeFrequency]]</changefreq>
    </url>
    


    The problem I seem to be having is with <loc>[[++site_url]][[~[[+id]]~]]</loc>. This produces the following output in the XML Sitemap.

    <urlset>
    <url>
    <loc>http://www.somedomain.com/www.somedomain.com/</loc>
    <lastmod>2011-07-12 00:26:32</lastmod>
    <priority>1.0</priority>
    <changefreq>monthly</changefreq>
    </url>
    
    <url>
    <loc>http://www.somedomain.com/page1/</loc>
    <lastmod>2011-07-12 00:28:56</lastmod>
    <priority>0.9</priority>
    <changefreq>weekly</changefreq>
    </url>
    </urlset>
    


    Every page bar the index page seems to be showing correctly, with the correct formatted URL. The index page shows as http://www.somedomain.com/www.somedomain.com/ as opposed to http://www.somedomain.com. I can see the the id tag seems to be pulling the domain name for the index page as the name of the page. I have set the page name to index and home, but the problem keeps occuring.

    Am I missing something here, or is there someway to condition this so the id tag doesn’t show if it is the index page?

    All help greatly apprecaited.

    Regards

    Craig
      • 5901
      • 11 Posts
      Any ideas on this one?

      Thanks

      Craig