We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28100
    • 66 Posts
    I added a snippet called "SiteMap" then created a blank template. Then I created a new document, set it to use the blank template and added the snippet call to the document ... but I got a error.

    So I removed the snippet call from the document and added it to the blank template instead and it works.

    And I just discovered that adding [*content*] to the template and placing the snippet in the document also works. tongue
    Can I suggest you add that to the Wiki article? It’s obvious when you think (and know) about adding the [*content*] ... but when you’re following directions with pure unadulterated faith (and hope) it’s not. At least, it wasn’t to me. wink
      • 4310
      • 2,310 Posts
      @spacefish
      I’ve added a note to the Wiki
        • 11418
        • 45 Posts
        I think it doesn’t work with me huh. Indeed :
        - I obtain the XML whether I type sitemap.xml ou sitemap.xml.hmtl
        - The sitemap doesn’t contain the last pages I created
        - And there is no sitemap.xml at the root of my site

        I’m a bit confused. Has anybody had the same problem as me?
          • 33549
          • 15 Posts
          Hello, I’m using your snippet within Modx 1.0.0. The sitemap is created fine but Google doesn’t find it if I try to load it through the Google webmaster tools.
          On the contrary, if I download the sitemap.xml file and place it in my www root, Google finds it. ANy idea?
            • 3085
            • 3 Posts
            Installed this and generating the sitemap.xml fine. However, Google has a problem because the sitemap is generating code like this:

            <loc>http://site.com/page.html</loc>

            And the site (in Google’s eyes) should actually be with the ’www’ like this:

            <loc>http://www.site.com/page.html</loc>

            How do I change the sitemap snippet to add the ’www’?

            Thanks for any pointers...
              • 25342
              • 13 Posts
              Is there a way to exclude docs via the snippet call. e.g. excludedocid=’31,32,34’

              I have a good 50 documents (not templates) i want to exclude, i dont want to go into everyone of them and select exclude via the tv option.
                • 4310
                • 2,310 Posts
                One option is to set the doc’s in question to non-searchable, then they will be excluded.
                  • 25342
                  • 13 Posts
                  Quote from: bunk58 at Jun 02, 2010, 07:33 AM

                  One option is to set the doc’s in question to non-searchable, then they will be excluded.


                  But then i have the problem of going to each document and setting one by one to not searchable.
                  The sitemap generator i used in Joomla could do it, wasnt sure if this had the same ability.
                    • 4310
                    • 2,310 Posts
                    It should be possible to modify the snippet code to do it.
                    But 50 documents at say 30 seconds per document to change the searchable checkbox would still be quicker wink
                      • 23082
                      • 8 Posts
                      I’ve been using this snippet and thanks to the step by step instructions It’s all working fine except for one thing that I can’t seem to understand.

                      Most of my site has a flat structure but the blog and shop are contained in folders such as: http://www.dermashield.co.uk/shop/compare-products-m-4.html

                      I’ve noticed that the resultant sitemap http://www.dermashield.co.uk/sitemap.xml does not contain any url within any folders.

                      Any suggestions?
                        I