We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10190
    • 187 Posts
    Hi,

    I’d like to have some menu items to appear in more than one menu section (folder). How can this be achieved without putting duplicate elements in the tree? I know duplicating is quite easy with modx, but I wouldn’t like to make changes in more then one document.

    I found a kind of solution for this by using weblinks as menu items in a second part of the tree as reference to the original document - this works as long as the title (and longtitle, menutitle etc.) doesn’t change.

    Maybe someone of you knows how to this with core modx, maybe there’s a snippet which enhances manager functionality to have documents in more then only one menu section?

    Cheers
    Frisco
      • 5340
      • 1,624 Posts
      Try Web Links first.

      Create Web Link and in the Web Link field click the icon and then click the document in the menu.

      Or simply enter the id document.
        • 10190
        • 187 Posts
        Hi Cipa,

        as I wrote I did this and I don’t like it ’cause I would have to remember to edit the title/longtitle/description/menutitle every time I change the title of a menu item.

        On a big site this is a problem, I would like to have that done automatically.

        Cheers,
        Frisco
          • 5340
          • 1,624 Posts
          Another solution might be to create a TV for that document in which you specify in which menu the document should appear.

          This is more complicated but here’s my idea:

          1. Create a TV for the template(s) called "Show in Menu(s)"
          2. This TV needs to be able to get the menu items from the database. If the menu is static then it’s easier. Just use the TV properties to create a dropdown list.
          3. The list will be shown as a multi select drop-down list. You can select multiple menu items to show the page in.
          4. Replace the regular menu (Probably you are using wayfinder) with your custom menu snippet.