We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36541
    • 222 Posts
    Quote from: arphaus at Oct 22, 2006, 07:46 PM
    how does one use this snippet?

    What you mean?

    - How to make a sitemap document?

    Usage instructions are included on the snippet’s repository page. IMO they are detailed enough.

    - What to use it for?

    Check Google Sitemaps and you should get the idea.

    - Something else?

    Elaborate, please.
      This is the web: the only thing you know about who will come is that you don't know who will come.
      • 2136
      • 134 Posts
      the repository makes no sense to me - it doesn’t say anything about what to do in terms of a step-by-step process. i’m not a programmer, by any definition.
        Sorry - not using ModX anymore 01/01/2007
        • 36541
        • 222 Posts
        Quote from: arphaus at Oct 23, 2006, 04:21 PM

        the repository makes no sense to me - it doesn’t say anything about what to do in terms of a step-by-step process. i’m not a programmer, by any definition.
        You don’t need to be a programmer to use it. It is just a snippet which means you need to call it from within a document to make it generate any output. However, you’re right there is no step-by-step procedure. Thus I plan to make one and publish it in MODx wiki once I get some spare time.

        Anyway here is the shortest possible how-to:

        1) Create a document in the root level of the document tree, use a blank template, set the content type to ’txt/xml’ and alias to ’sitemap.xml’.

        2) In the document content field call the snippet:
         [[sitemap? &format=`sp`]] 


        3) Log in to your Google sitemaps account and register your new sitemap file.

        You can examine it at http://yourdomain.com/sitemap.xml. If you want to get a readable output, you have to get an XSL stylesheet as described in the repository entry. Once you downloaded it, simply duplicate your ’sitemap.xml’ and paste the contents of the XSL into it. Then change the document alias to ’sitemap.xsl’ and save. Now, you should be able to see it better smiley

        The sitemap you created includes each and every document from your site. This is not necessarily what you would want. To exclude documents from it follow instructions from the repository entry.

        I hope this will help you to get started.
          This is the web: the only thing you know about who will come is that you don't know who will come.
        • I’d assume it should probably be an uncached page too.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 2136
            • 134 Posts
            thanks very much - that i can understand.

            ryan: i’ve taken to keeping my pages uncached by default since it seems like every page i make has a snippet, chunk or tv in it. cached pages are only for static content, right?
              Sorry - not using ModX anymore 01/01/2007
            • Not really, but that’s another topic entirely not related to this thread. smiley
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 36541
                • 222 Posts
                Quote from: rthrash at Oct 24, 2006, 08:48 PM

                I’d assume it should probably be an uncached page too.
                I use a cached call with the same result.
                  This is the web: the only thing you know about who will come is that you don't know who will come.
                  • 14779
                  • 256 Posts
                  I am getting the following error:

                  XML Parsing Error: xml declaration not at start of external entity
                  Location: http://heav.org/sitemap.xml
                  Line Number 1, Column 48:<pre style="margin-top: 0pt; display: inline;"><?xml version="1.0" encoding="UTF-8"?>
                  ---------------------------------------------------------------------^


                  The source code for the page starts with:

                  <pre style="margin-top: 0pt; display: inline;"><?xml version="1.0" encoding="UTF-8"?>

                  How do I fix this?
                    PM me to find out how you can get a FREE ipad 2!
                    • 2136
                    • 134 Posts
                    i got that too. then removed the rich text editor, deleted that ’pre style’ stuff and changed the call to

                    [!sitemap? &format=`sp`!]

                    which resulted in this

                    Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:http://inkwire.net/sitemap.xsl


                    which seems to be what it should do according to grad:

                    You can examine it at http://yourdomain.com/sitemap.xml. If you want to get a readable output, you have to get an XSL stylesheet as described in the repository entry. Once you downloaded it, simply duplicate your ’sitemap.xml’ and paste the contents of the XSL into it. Then change the document alias to ’sitemap.xsl’ and save. Now, you should be able to see it better

                    is that the correct behavior?
                      Sorry - not using ModX anymore 01/01/2007
                      • 14779
                      • 256 Posts
                      I followed the directions to set up the stylesheet.
                      I got this error when I tried to access http://heav.org/sitemap.xml

                      Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:
                      http://heav.org/sitemap.xsl
                        PM me to find out how you can get a FREE ipad 2!