• No results found

1. Help, no menu is output!

Check that you have actually called Wayfinder in your document/template Did you forget to specify &startId?

Check your spellings for &startId. &startid will cause errors/not work

Check that you are using backticks (``) around your parameter values and not single quotes ('')

Try disabling CSS when viewing your site. If the menu shows then the problem is in your CSS.

Check for things such as text-indent:9999px; and edit as appropriate

If using a &startId value other than the root does the container parent have child documents? If not then there is nothing to output

Did you create your Wayfinder template chunks correctly? Make sure you have [+wrapper+]

in your templates

Are your documents published and set to "show in menu"?

Make sure you have the placeholder [+wf.linktext+] in your row level templates Use &debug to find out what exactly Wayfinder is doing/processing

2. My JavaScript (e.g. jQuery) menu does not show

There could be a conflict between JavaScript libraries. This can happen for example if you have installed and are using QuickEdit in MODx and ARE NOT running jQuery in non-conflict mode

Is JavaScript enabled in your browser?

3. My menu is not output the way I want (indentations, positions, etc are off) That's a CSS issue - not a Wayfinder one

4. Wayfinder is not using the template chunks I want

128

Check the spellings of the chunk names - they are case sensitive too

Make sure you have specified the chunks you want to use in your menu in your Wayfinder call

5. I cannot see my sub-menus

Check the &level parameter value; is it >1?

Does the document you are viewing have child documents? Are those documents published?

6. I want to sort my menu differently

You can use menu index to order your menu items

If you want to you may also use &sortBy and &sortOrder parameters to control the order

7. Using Wayfinder with another nested snippet does not work

Make sure you alternate the caching status of the snippets. For instance call Wayfinder uncached [!!] and the nested snippet cached [[]]

8. I would like to apply a class to my row level menu items

You can use the &rowClass parameter or include your class directly to the row level Wayfinder template

9. I would like the document specified as the &startId to also show in my menu

Set &displayStart=`TRUE` and define a &startItemTpl if you don't want Wayfinder to use its default one

10. Wayfinder is using the &outerTpl to construct the containers of my sub-menu; I don't want this

Make sure you define a &innerTpl

129

Same argument applies to &rowTpl with respect to your sub-menu rows; create an

&innerRowTpl to stop Wayfinder from using &rowTpl to construct to construct your sub-menu's row items

11. Wayfinder is applying the "wrong" template to my menu item

This could be a case of the template processing order in Wayfinder. In case a menu item qualifies to be constructed using any of the templates you has specified, Wayfinder's template processing order kicks in. For instance if you specify both a &parentRowHereTpl and a &parentRowTpl, the former will have precedence and hence will be applied

12. I don't want certain documents to appear in a certain Wayfinder menu but would like to use them in another

You can achieve this using &excludeDocs or &includeDocs

13. I want more than one level of my menu to be shown Use &level with a value >1

14. Wayfinder is not outputting my classes

Make sure you are using the [+wf.classes+] or [+wf.classnames+] placeholders in your Wayfinder templates

15. The links in my menu are not clickable!

Remember to include the [+wf.link+] placeholder in the relevant Wayfinder row level templates and that your row level templates are properly constructed to output links

16. I do not want my sub-menus shown unless their parent menu item is active Use and set &hideSubMenus=`TRUE`

17. I want to limit the number of documents output to the menu

130 You could use the &limit parameter

18. What could I use to output my menu with category/heading information?

You could use the &categoryFoldersTpl parameter

19. What if I want classes applied to my first and/or last menu items?

Use &firstClass and &lastClass parameters respectively. The latter is applied by default with the value "last"

20. What is this "active" class being applied to my menu items by default?

That is coming from the &hereClass which is applied by default. If you do no want it you can specify &hereClass=`` in your Wayfinder call. You can change the class name if you like by doing this &hereClass=`name_you_want`

The same principles can be applied to the other Wayfinder classes where applicable

21. I would like my parent menu items to be styled/constructed differently

You have a choice of parent row level parameters to choose from. These are: &parentClass,

&parentRowTpl, &parentRowHereTpl and &activeParentRowTpl

22. I would like my sub-menus to be styled/constructed differently

You have a choice of sub-menu specific row level parameters to choose from. These are:

&innerTpl, &innerRowTpl, &innerClass and &innerHereTpl

23. What do I use to create/achieve a breadcrumb-like menu?

If you want this for all the active menu items including the document you are currently browsing together with its parent and grandparent documents, you need to take advantage of the &hereClass which applies the class "active" to all currently active documents inclusive of their parent and grandparent documents.

If you want this for only the parent, grandparent documents, etc of the current document,

131

you need to use &activeParentRowTpl which will only be applied to the currently active parent documents

24. How can I style/apply a template to the current document/menu item ONLY and not any other?

You can use the &selfClass and &hereTpl respectively.

If you wish you can also use the &innerHereTpl which is an equivalent of the &hereTpl for current sub-menu items. Note that &hereTpl if defined will be used in all cases unless you specify &innerHereTpl

The &parentRowHereTpl is the equivalent of &hereTpl for parent documents only. To use it you must specify it otherwise &hereTpl will be used if specified

25. How do I make Wayfinder output full links and not relative ones?

Use &fullLink=`TRUE`

26. I want to give my menu items unique ids

Use &rowIdPrefix and don't forget to use the [+wf.id+] placeholder in your row level templates

27. How do I make Wayfinder include in its output documents whose "show in menu" box is UN-TICKED (i.e. not to be shown in menu)

Use &ignoreHidden=`TRUE`

28. I want to apply a Wayfinder class to my menu and sub-menu containers (i.e. &outerTpl and innerTpl respectively)

Use &outerClass and &innerClass for the &outerTpl and &innerTpl respectively.

You could also apply the class directly to the respective template chunks

29. Which Wayfinder templates are always required?

The &outerTpl and the &rowTpl for the menu container and row level items respectively. In

132

addition, if &displayStart=`TRUE` then &startItemTpl is required. Wayfinder has in-built templates for all the three parameters that it will use by default when/if applicable, i.e.

when you don't specify define your own

30. Can I apply a different class to my weblinks?

Yes you can - use &webLinkClass

31. Can I use MODx document variables within Wayfinder?

Sure. Just reference them using the syntax [*document_field_name*]. For instance [*parent*] or [*longtitle*]

32. Can I use MODx TVs with Wayfinder?

Yes you can. Just reference the TV using the following syntax [+TV_name+]. For instance [+myTV+]

33. What about including the description and/or the introtext of my documents in my Wayfinder menu?

Use the placeholders [+wf.description+] and [+wf.introtext+] respectively

34. How do I instruct Wayfinder to include a link to a CSS and/or a JavaScript file in the HEAD section of my document's template?

Use the parameters cssTpl and &jsTpl respectively

35. How can I call Wayfinder in one location and have it place its output in another?

You will need to use the &ph parameter

36. How can I show a main menu in one location of my template and have its sub-menu shown in another location of my template?

You could achieve this using Wayfinder and the snippet UltimateParent

133 37. How do I debug Wayfinder's output/menus

You use and set the parameter &debug=`TRUE`

38. How can find more information/help about Wayfinder?

http://www.muddydogpaws.com

http://modxcms.com/forums/index.php/board,182.0.html

CHAPTER 17: APPENDIX