We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25803 ☆ A M B ☆
    • 721 Posts
    I haven’t had opportunity to use Ditto yet with MODx. Does this mean that the Sitemap snippet doesn’t work with Ditto?
      • 18397
      • 3,250 Posts
      This tutorial is simply a way of recreating a result similar to the sitemap snippet using only Ditto rather than a custom snippet.
        • 7231
        • 4,205 Posts
        The link to the tutorial is broken. :’(
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 8161
          • 39 Posts
          Hi and thanks for the articles it helps me a lot, but I receive strange dates:

          http://www.goaddsite.com/debts-and-loans4/sitemap.xml

          what could be the problem for this? My hosting or ... cause the other dates of the site are fine.

          Solved:

          I found this https://mirror3.cvsdude.com/trac/ditto/codebase/ticket/89 and remove &sortby=`createon` and it works just fine, but without sorting options smiley
            • 36582
            • 463 Posts
            Just to say thanks for this tutorial - I tried the sitemap snippet but with this method there is more control of what is actually displayed on the site map. Certainly works for me.
              Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
              • 34162
              • 1 Posts
              Great Tutorial and it’s now nearly 2 years old! One note though, using showInMenuOnly was not an option for me given that I had a number of non-menu pages that I needed in the sitemap. Instead I used the following (note the use of showPublishedOnly rather than showInMenuOnly) and specified the id of my sitemap file in the filter so that it is not shown:

              <?xml version="1.0" encoding="UTF-8"?>
              <urlset xmlns="http://www.google.com/schemas/sitemap/0.9">
              [[Ditto? &dateFormat=`%Y-%m-%d`&startID=`0` &tpl=`sitemapTpl` &dateSource=`editon`&summarize=`500` &total=`500` sortby=`createon`&showPublishedOnly=`1`&depth=`5`&filter=`type,document,1|id,54,2`]]
              </urlset>
                • 19741
                • 90 Posts
                Hi,

                if you don’t need "priority" and <changefreq>weekly</changefreq> is okay , you can use the attached format file (extract attached file to: assets/snippets/ditto/formats/xsmap.format.inc.php ). Advantage: you don’t need any chunks in your database. smiley


                My Ditto-call looks like this:
                [!Ditto? &parents=`0` &format=`xsmap` &depth=`10` &display=`all`!]


                  Bye,
                  Mithrandir
                  • 19889
                  • 616 Posts
                  Hope somebody can help me on this - trying to register the sitemap with Google results in the following error:

                  General HTTP error: 404 not found
                  We encountered an error while trying to access your Sitemap. Please ensure your Sitemap follows our guidelines and can be accessed at the location you provided and then resubmit.

                  I must be something missing.

                  Thank you in advance for your help.
                    • 37242 ☆ A M B ☆
                    • 339 Posts
                    Did you publish the sitemap document?
                    An URL would help smiley
                      • 19889
                      • 616 Posts
                      the document is published and I set an alias like sitemap.xml