Here’s a better explanation instead of just referring to the generally minimal and poor examples offered by the wiki or the strangely impossible-to-find compiled documentation for
modx revolution 2+:
I just started to try out modx and in regarding to the wayfinder snippet and how to format them it does seem confusing, I would not call it intuitive. Maybe it’s the lack of proper documentation and examples. For the many unordered lists posts answered, if it’s so simple surely someone could offer an example or two for an ordered list example, beside mine below also, if there are alternatives. Obviously such examples would help make the connection between css, placeholders, chunks, and snippets.
There may be other methods for setting up the list tags <ol>,<li>, etc as in doing so in the actual chunk that you will need to create and then reference back in the wayfinder call in your template. I did this previously but lost the exact code and setup i used, but can offer this setup, which does work:
1. Create a new document template.
2. In your new template, using the wayfinder snippet, you need to make a call to 2 things: a) your css to format the list, b) an html "chunk" which holds the list placeholders or info to be outputted back to the wayfinder snippet.
In your new template for example:
<div id=’mynavlist’><ol>[[Wayfinder? &displayStart=`true` &startItemTpl=`navlist` &outerTpl=`navlist`]]</ol></div>
Here you are using the wayfinder snippet (you need installed (3rd party package,
http://wiki.modxcms.com/index.php/Wayfinder **be careful this doc has old syntax not for modx revolution)
that through the above parameters will output the parent and direct children links in an ordered list.
The outerTPL parameter (means outermost container) basically connects the called chunk, navlist, with the formatted div id you have in your template. The others - i believe - tell it "start item" at the same document you are creating in your document tree and also display all its children.
3. So now you need a "chunk" of html with some placeholders that will return back the desired items from the document tree back to the wayfinder call. Create a new chunk and according to this example name the chunk "navlist"
4. In the chunk, put the following:
<span class="navlistlabel">[[+wf.linktext]]</span>[[+wf.wrapper]]
the wf.linktext is the parent or start item or root of the list items that you’re calling from the document tree. I put a span around this that you can style in your css. This will just show the name. The wf.wrapper are rest of the list items set up by default as rows of <li>link</li>.
5. Lastly set up the css need to process the list, EX:
#mynavlist ol { margin: 0; padding: 0; list-style-type:decimal; }
#mynavlist li { font: normal 12px Arial, Helvetica, sans-serif; }
#mynavlist li a { font: normal 12px Arial, Helvetica, sans-serif; text-decoration: none; color: #000; }
.navlistlabel { font: bold 14px Arial, Helvetica, sans-serif; }
On your document that you have linked to a template with the above wayfinder call and chunk saved. This should return an ordered list, and specifically for this example for parent (itself in the tree and children).
Like I said, i just started trying out modx revolution and this might be rouugh, there might be better or alternative ways. I hope other people can chime in, because in my opinion the modx ’learn’ section and regular documentation don’t exactly help make the fundamentals clear regarding calling and return diverse placeholders or what is already setup. Maybe I’m a person who learns by example and then doing. Well, here’s a simple example. Hope it helps somebody.