How can I get Babel and WayFinder working with different contexts and unique startids?

222 views Asked by At

I am using MODX Revolution 2.5.6-pl. I have a multilingual site with several languages using Babel which is working as expected. However, for the navigation I have a startid, which relates to a container in my default (English) site. The other languages will use the same template and therefore the same WF call. How can I modify the WF call so that I can provide unique startids for every language context? - Or do I need to create a unique WF call for every language?

This is my WF call:

[[Wayfinder?
        &startId=`80`
        &outerClass=`navigation__nav__list`
        &innerClass=`navigation__nav__submenu`
        &rowTpl=`navigationRows`
        &rowIdPrefix=`nav__item`
        &level=`3`
        ]]
1

There are 1 answers

0
Sean Kimball On

wayfinder has an option: &startIdContext but does not appear to be documented (post your question in the modx forums) failing that you can set a context variable on ewach context & call wayfinder:

[[Wayfinder?
        &startId=`[[++context_start_id]]`
        &outerClass=`navigation__nav__list`
        &innerClass=`navigation__nav__submenu`
        &rowTpl=`navigationRows`
        &rowIdPrefix=`nav__item`
        &level=`3`
        ]]