We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    This is an auto-generated topic for sitemapFriend 1.0-beta2 by robodesign.

    Brief Description:

    The sitemapFriend snippet for MODx Revolution provides all the functionality you might need for generating site maps for your web site. You can generate HTML pages, Google Sitemap XML or ... any custom format you want (like text-links only) by editing the provided chunks.
    New in this version:

    • Fixed issue #1: localization issues.
    • Fixed issue #2: Function to exclude all children from a parent (excludeChildrenOf).
    • Fixed issue #3: skip external links (modWebLink).

      • 5357
      • 30 Posts
      Is there any way to control both the priority and frequency, rather than it defaulting to when the resource was last updated?
        • 26417
        • 1 Posts
        @rossco

        I had the same problem. I think the initial documentation was slightly off. I had entered this (via copy/paste)

        [[!sitemapFriend &type=`html`]]


        But needed this:
        [[!sitemapFriend? &type=`html`]]
        (note the question mark after sitemapFriend).

        After I got it up and running, I noticed a couple of things:

        1) I couldn’t get it to not display hidden documents (showHidden=`false` didn’t do it)
        2) ampersands aren’t being converted to & in the dc:title field

        I’m running 2.0.7-pl and the sitemapFriend version is 1.0 beta2

        thanks

        Thanks
          • 886
          • 39 Posts
          Quote from: citrus at Feb 21, 2011, 06:58 AM

          Is there any way to control both the priority and frequency, rather than it defaulting to when the resource was last updated?
          I had the same problem. Here’s a (not so elegant) fix:

          • make two TVs: "changefreq" and "priority" and use them on all templates that you might want to set custom changefreq and priority
          • change the sitemap_xml_item chunk: replace the <changefreq> and <priority> lines with the ones i’ve provided below
          • if you haven’t, install getResourceField extra
          if you need any more details, let me know

          <changefreq>[[!getResourceField:ifempty=`[[+changefreq]]` ? &id=`[[+id]]` &field=`changefreq` &processTV=`1`]]</changefreq>
              <priority>[[!getResourceField:ifempty=`[[+priority]]` ? &id=`[[+id]]` &field=`priority` &processTV=`1`]]</priority>


          On a different subject, i’m working on a fix to allow to set "lastmod" from a list of children. What do i mean?
          For example, i have this structure:
          Events
            |------Event 1
            |------Event 2
            |------Event 3
            |------...
          

          and i want the <lastmod> of the "Events" resource to match the <lastmod> of the most recently edited child.
          I created the code to get the latest "editedon", I now have to integrate it to the sitemapfriend snippet...
          Hopefully you’ll have news soon in case you’re interested
            • 1331
            • 129 Posts
            I think the link to the documentation needs to be included in the plugin description so that it appears in MODx. I had to go all over the net trying to find out how to use this.

            Also, the documentation within the plugin itself is wrong.

            Why hasn’t this been updated?

              • 19328
              • 433 Posts
              Hi, I’m using this great add-on for a html sitemap on my website. I would like to know if it would be possible to give the last item in the sitemap a custom class, like ’lastItem’, so I could style it different. Does anyone know how I could achieve this? (and maybe the first item as well..?)

              Thanks for any help!
              Michelle
                • 7966
                • 90 Posts
                I try to change the tplitem but it seems it is not using the tpl that I define below, instead it continues to use the default.

                [[!sitemapFriend? &type=`xml` &tplItem=`sitemap_xml_item_g1` &showHidden=`0` &includeResources=`1707,170` &excludeResources=`1709,67` ]]


                Any ideas what is wrong in above statement.
                  • 9674
                  • 170 Posts
                  Quote from: dragona at Sep 23, 2011, 09:17 PM
                  I try to change the tplitem but it seems it is not using the tpl that I define below, instead it continues to use the default.

                  [[!sitemapFriend? &type=`xml` &tplItem=`sitemap_xml_item_g1` &showHidden=`0` &includeResources=`1707,170` &excludeResources=`1709,67` ]]


                  Any ideas what is wrong in above statement.

                  It seems from the documentation that &tpl options are only suported with html option.

                  in http://rtfm.modx.com/display/ADDON/sitemapFriend under Templating Properties it says :
                  The chunk to use, for non-XML sitemaps, as an outer container for the entire sitemap output