We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37099
    • 338 Posts
    With Evolution's sitemapXML snippet you had three TVs that controlled the priority and frequency values, and wether to exclude a page from the sitemap.xml.

    How do you do this with GoogleSiteMap for Revo, I created the same TVs but they didn't work?

    I couldn't find anything in the documentation, and googling didn't come up with anything.

    Thanks
    Mike


    Revo 2.2.5

    This question has been answered by thingstodo. See the first response.

      • 25803 ☆ A M B ☆
      • 721 Posts
      Quote from: thingstodo at Dec 05, 2012, 12:28 PM
      With Evolution's sitemapXML snippet you had three TVs that controlled the priority and frequency values, and wether to exclude a page from the sitemap.xml.

      How do you do this with GoogleSiteMap for Revo, I created the same TVs but they didn't work?

      I couldn't find anything in the documentation, and googling didn't come up with anything.

      Thanks
      Mike


      Revo 2.2.5

      Looking at the documentation (http://rtfm.modx.com/display/ADDON/GoogleSiteMap.GoogleSiteMap), I'd try to create custom templates with your own template variables in them or mimic the default tvs and set them per document and see if works. Looks like you have to set containerTpl and itemTpl. There are examples of the defaults in the documentation.

      Exclusion is a little harder it appears as you have to input the docid in the snippet call, which is of course, not client friendly.

      • discuss.answer
        • 37099
        • 338 Posts
        Had a look at the code, there is a an undocumented TV to set priority: "priorityTV"

        So use [[!GoogleSiteMap? &priorityTV=`priorityTV`]] to set the priotity of a page.

        This is quite useful because the Extra as it is works out the priority based on the last time the page was updated, so if you haven't updated your main landing page for a couple of months it will get a priority of 0.25 wheras if you have just modified your "Contact Us" page it will get a priority of 1.

        The update frequency value is calculated by the Extra giving values of daily, weekly or monthly depending on how long ago the page was updated


        I've hacked the code so that you can also use &excludeTV=`excludeTV` &frequencyTV=`frequencyTV`

        The excludeTV should have values "Yes" and "No" and defaults to No. So you can exclude your "Thank you for contacting us" page. ( Setting showHidden to false would hide pages that are published and I want to be linked to but don't want to show in the menu )

        The frequencyTV should have values "calculate,always,hourly,daily,weekly,monthly,yearly,never"
        and defaults to "calculate" which uses the values already calculated by the extra.

        I include the file. It should go in the core/components/googlesitemap/model/googlesitemap folder without the .txt bit.

        Does changing files mess up any checksums or anything like that with the package manager?

        Thanks
        Mike