Fast and simple site map with Wayfinder

on 23-Feb-2010 | Comments ( 6 ) Tags: Evolution, Wayfinder

Wayfinder can be use to quickly create a site map for your website. Because modx is so amazing, there are at least 3 ways of doing it. The method below is the most flexible I know because it allows to style your site map template any way you want.

Create the 'Site Map' template.

In order to create a site map template just duplicate one of your current templates.

Name your new template 'Site Map', add a description and make sure it contains the code below.

<div id="siteMap">
	[[Wayfinder? &startId=`0` &ignoreHidden=`true`]]

Create the 'Site Map' document

Create a new document/resource and assign the above template. The 'Site Map' document usually sits in the root of your document structure and most times has "Show in menu" unchecked to avoid displaying the site map in the main menu.

Once the document is saved, preview it.

Remove any unwanted documents

Usually you need remove some documents from your site map. Use the excludeDocs parameter to do it.

[[Wayfinder? &startId=`0` &ignoreHidden=`true` &excludeDocs=`150,58,59`]]

Style it

Use the css template below to style your site map to your liking

#siteMap {}
#siteMap ul {}
#siteMap ul li{}
#siteMap ul li a{}
#siteMap ul li a:hover{}

Share your website site map details below. A link would be nice!

Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
Posts: 5
Sitemap on
Reply #6 on : Thu May 13, 2010, 21:50:48
Thanks for the article I have used it on
<a href=""></a>

Also, do you knwo how I can hide the unpublished pages from the sitempa automatically please?
Posts: 1
Re: Fast and simple site map with Wayfinder
Reply #5 on : Fri May 14, 2010, 06:43:45
Are you sure they are unpublished. Wayfinder should hide unpublished documents by default.
Posts: 5
Re: Fast and simple site map with Wayfinder
Reply #4 on : Mon May 31, 2010, 18:08:18
super, thank you!
Bob Howard
Posts: 5
Site Map repeats it self
Reply #3 on : Tue July 27, 2010, 12:50:35
Hi, when I used the wayfinder call in the template the site map was repeating itself. When I changed it to only use the call on the page it now works fine. I still need to do some formatting but thanks for the great tip on creating a site map.
Posts: 5
Good one
Reply #2 on : Wed April 18, 2012, 03:59:03
Great article, helped me to create a site amp using wayfinder. thank you so much!!!
Posts: 5
Exclude child documents
Reply #1 on : Wed August 22, 2012, 03:43:10
How to Exclude child documents?

Quick modx Evolution Tags

  • cached [[snippet]] or uncached [!snippet!]
  • {{chunk}}
  • [+placeholder+]
  • [*resourceField/TV*]
  • [^timing^]
  • [~link~]

Quick modx Revolution Tags

  • [[snippet]]
  • [[$chunk]]
  • [[+placeholder]]
  • [[*resourceField/TV]]
  • [[~link]]
  • [^timing^]
  • [[++systemSetting]]
  • [[%languageStringKey]]
  • all tags can be called un-cached like: [[! snippet]]

Timing Tags (Evo and Revo)

  • [^qt^] - Query time
  • [^q^] - Query count
  • [^p^] - Parse time
  • [^t^] - Total time
  • [^s^] - Source
© modxRULES! 2009-2014