Jump to main content Jump to doc navigation

What is GoogleSiteMap?

GoogleSiteMap is a snippet that will display a Google-customized SiteMap for your site.


  • MODX Revolution 2.2.x or later
  • PHP5.4 or later

Historyand Info

In 2016 GoogleSiteMap was completely re-written by YJ Tso (@sepiariver) based on blazing-fast sitemap code by Garry Nutting (@garryn), after it was found that the legacy Snippet would time-out when more than several thousand nodes needed to be generated.

The trade-off was that some of the legacy features could not be supported. An attempt was made to maintain backwards compatibility, by calling the legacy Snippet if a legacy feature is required.

The legacy GoogleSiteMap Snippet was originally written by Shaun McCormick (splittingred) as a Snippet to display a Google SiteMap, and first released on June 23rd, 2009.


It can be downloaded from within the MODX Revolution manager via Package Management, or from the MODX Extras Repository, available here: https://modx.com/extras/package/googlesitemap

Development and Bug Reporting

GoogleSiteMap source code is managed in GitHub, and can be found here: http://github.com/modxcms/GoogleSiteMap


GoogleSiteMap can be called via the Snippet tags.


GoogleSiteMap comes with two snippets:


Display a Google SiteMap for tens of thousands of Resources.


Display a Google SiteMap for a more modest number of Resources, using a custom item template Chunk.

[[!GoogleSiteMap? &itemTpl=`myCustomTpl`]]

Note: the latter example would result in the legacy Snippet being called and will time-out if a huge number of nodes need to be generated.

See Also

  1. GoogleSiteMap.GoogleSiteMap
    1. GoogleSiteMap.GoogleSiteMap.containerTpl
    2. GoogleSiteMap.GoogleSiteMap.itemTpl
  2. GoogleSiteMapVersion1

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.



$0 per month—let's make that $500!

Learn more