We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13226
    • 953 Posts
    I have just found the equivalent of the GoogleSiteMap snippet I have been using for years in Evo but it doesn't seem to work.

    Does anyone have this working in the latest traditional version of Revo ?

    Snippet: GoogleSiteMap 1.3.1-pl
    RTFM: GoogleSiteMap.GoogleSiteMap

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

    • discuss.answer
      • 13226
      • 953 Posts
      My bad - got it working

      If anyone is transfering from Evo to Revo and are wanting to use the same snippet as previously used, note that the allowed template values are not the template names but the template ID

      And also add &showHidden=`true` to show pages that are hidden from the menu
        • 13226
        • 953 Posts
        For those who are interested:

        A quick fix if you wish to use the Google sitemap schema using this snippet

        Create a new gcontainer chunk, call it lets say "gsmcontainer" and add the following
        <?xml version="1.0" encoding="[[++modx_charset]]"?>
        <urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
        [[+items]]</urlset>

        If you have an XSL stylesheet for the sitemap you can link to it from this chunk like so
        <?xml-stylesheet type="text/xsl" href="[[++site_url]][[~5]]"?>

        Your final code should look like this - if using a stylesheet
        <?xml version="1.0" encoding="[[++modx_charset]]"?>
        <?xml-stylesheet type="text/xsl" href="[[++site_url]][[~5]]"?>
        <urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
        [[+items]]</urlset>