We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28676
    • 136 Posts
    Kind of makes you wonder if the msn one is worth it, seems to index all pages quite easily, unlike google.

    My site is still in the sandbox.
      I made my first site with modx
      ------------------------
      http://www.shop-bright.com | Uk shopping blog
      • 36541
      • 222 Posts
      Quote from: rthrash at Nov 16, 2006, 03:27 PM
      Looks like we need another core snippet, too. wink

      SiteMap needs to be reworked to meet the guidelines for creating snippets. I already reworked my other snippet -- GetField -- and now, I wonder which way SiteMap should go.

      I thought about RDF feed. But then, I came to conclusion that I would have to duplicate a big part of Ditto functionality, which wouldn’t make much sense. Ditto, however, generates its output in the same way as SiteMap does; that is the output format is embedded inside the snippet. Be it RSS, XML, or JSON, they are included in the code. To make it possible for Ditto to output sitemap in RDF (or any other output), it would have to output ONLY placeholders and support filtering by a document template and template variable (which is already supported, I guess). Having all that, all I would have to provide are just templates which use Ditto and GetField.

      What do you think?
        This is the web: the only thing you know about who will come is that you don't know who will come.
        • 4873
        • 11 Posts
        Hi,

        I implemented SiteMap in my site and it seems to be working ... only in MSIE. In FF i got the following error message:

        Error during XSLT transformation: An unknown XPath extension function was called.

        I read Carlotto’s post and added AddType application/xml .xsl to my .htaccess, but it doesn’t help.

        I guess the problem comes from Enarion.net’s XSL (meaning this might not be the right forum to find support). But I’d appreciate if anyone solving the same problem can share the solution smiley

        Many thanks,

        Cevic
          • 4295
          • 98 Posts
          Grad, very nice snippet. As you mentioned in a previous post, selecting "(blank)" for the template actually means the lack of a template and the user has to create their own new "blank" template. But I’d like to exclude all weblinks and weblinks seem to default back to "(blank)" no matter what template is selected. Is there anyway to exclude all documents that use "(blank)" -- or is this not possible at this time? Thank you!
            • 36541
            • 222 Posts
            Quote from: cevic at Nov 21, 2006, 12:06 PM

            I guess the problem comes from Enarion.net’s XSL (meaning this might not be the right forum to find support). But I’d appreciate if anyone solving the same problem can share the solution smiley

            Sorry, as I mentioned earlier, I can’t provide support for XSL. The core is the sitemap, and XSL is not required for it to work. You don’t need it. Take a look at the source of your sitemap. I assume you have read the documentation.

            Quote from: bullrat at Nov 21, 2006, 01:58 PM

            I’d like to exclude all weblinks and weblinks seem to default back to "(blank)" no matter what template is selected. Is there anyway to exclude all documents that use "(blank)" -- or is this not possible at this time?

            Don’t know at the moment, probably it would require to just filter out weblinks. I’ll try to take a look at it.
              This is the web: the only thing you know about who will come is that you don't know who will come.
            • Would be easier to exclude all documents that have the type of "reference".
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 23383
                • 138 Posts
                Here is a fix to check if default template is set to (blank) in manager :
                change this :
                // filter out documents
                foreach ($docs as $doc)
                {
                	if (!in_array($doc['template'], array_flip(array_intersect($allTemplates, $excludeTemplates))))
                		if (!$doc[$excludeTV] )
                			$output[] = $doc;
                }


                With this :
                // filter out documents
                foreach ($docs as $doc)
                {
                	if (!in_array($doc['template'], array_flip(array_intersect($allTemplates, $excludeTemplates))))
                		if (!$doc[$excludeTV] && $doc['template']!=0 )
                			$output[] = $doc;
                }

                (around line 120)

                  • 31037
                  • 358 Posts
                  Hi, just wanted to say thank you for this great snippet and it’s very good documentation! Got it working almost with no problem (just a small problem with the site map being listed in the site map, but found the answer in this thread).

                  Again, thanks! smiley
                    • 29181
                    • 480 Posts
                    I’m sorry if I am missing something very basic but I’m getting an error. I followed the first few steps at http://wiki.modxcms.com/index.php/SiteMap:_Google_sitemaps_in_MODx up until "Now, take a look at it. It is a pure XML so it may be not easily readable. "

                    The error I am getting is Error loading stylesheet: A network error occured loading an XSLT stylesheet:http://localhost/cms/modx-0.9.5/modx-0.9.5/sitemap.xsl

                    As you can see I’m testing it locally, but cannot understand why it is having trouble loading a stylesheet...when I’m using a "blank" template

                    These are the steps I have carried out so far:

                    I created a snippet called SiteMap and pasted the contents of sitemap_1.0.2.txt into it and saved.

                    I then created a sitemap.xml document (text/xml) text with the following contents (done with no editor)

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

                    Once again, sorry if there is an obvious solution. I have no experience with ModX as yet but an average knowledge of CSS & PHP.

                    I hope someone can help or point me in the right direction.

                    Cheers,
                    Taff
                      Adrian Lawley: www.adrianlawley.com
                      • 16885
                      • 255 Posts
                      Did you upload the stylesheet into that folder and renamed it to match the ’sitemap.xsl’ format? By default it has another filename.