We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39115
    • 15 Posts
    I have found the solution. Based on menu build via getResources snippet and Babel package.

    Unfortunatelly you can't use the ROOT of each context. The ROOT of each context should be document marked as site_start. This is my instruction how to do this:

    1. move all documents to your site_start in each context. For example

    web (context)
    +about us
    +contact
    +home page <---- in this context this is your "site_start" document
    +offer

    rebuild:
    +home page <---- in this context this is your "site_start" document
    ++about us (next level)
    ++contact (next level)
    ++offer (next level)


    In the same way change it in your contexts for other languages


    2. in getResources snippet call remove parameters:
    - &parents
    - &context

    3. in getResources snippet call add parameter:

    &resources=`[[!getChilds? &id=`[[++site_start]]`]]`

    4. create snippet: getChilds
    code:

    return implode($modx->getChildIds($id,1),",");

    This is an easy solution for one menu of multilanguage site. I dont know yet how use it for more than one menus on one page.