Question

I'm trying to use &levelClass parametr of Wayfinder snippet of Modx. But it doesnt work. I have menu that contains of 3-4 levels, and each level has own class (like first level is "lvl1", second is "lvl2" and so on), and because of that I want to use levelClass, which promise to increment number of my class by 1 each new level. Thats how I'm trying to call it:

[!Wayfinder? &startId=2  &rowTpl=lfRow &outerTpl=lfOuter &levelClass=lvl!]

But Wayfinder doesn't change class and doesn't join CSS also. And I using Modx Evolution. Have you any ideas?

Était-ce utile?

La solution

Assuming levelClass is available in the Evolution version of Wayfinder...

Since you're using custom templates, you'll need to manually add the wf.classes placeholder in your chunk, eg

<!-- lfRow chunk -->
<li[+wf.id+][+wf.classes+]> ...
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top