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

    I started using MODX less than 3 weeks ago and I think is incredible compared to other CMS smiley

    Now, I would like to know when possible in MODX to have a menu to dedicate for the sidebar that is different from the main navigation on top.

    In the specific:

    On this website that I am developing https://www.dev.stephan-fuhrer.ch/vorlesungen.html I would like insert in the right-sidebar a navigation with different resources than the one on top in the hamburger menu.

    I have this page for example https://www.dev.stephan-fuhrer.ch/1-entwicklung-des-versicherungsrechts.html that is hidden in the main navigation on top but should be visible in this right-sidebar

    So the questions are:

    1. How can I define different a menu for some specific resources?
    2. How can I then implement this menu in the sidebar?

    Thanks in advance

    This question has been answered by nuan88. See the first response.

    • discuss.answer
      • 46886
      • 1,154 Posts
      ;') Welcome!

      For this its pretty easy, you can use Wayfinder to get the links dynamically. With Wayfinder you can tell it go to a folder (a resource which is also a container) and get all the links there and output them. Then you can add some styling and make it perfect.

      Here's a basic link, stick it in the sidebar you've got there on the right. change the number 40 to a published resource number, make that resource a container, and just drag and drop some child resource pages right into it. They should output into that box.

      Oh, don't forget to install the Extra Wayfinder lol I forgot the most important part. And make sure those child resources are published too.

      <h3>Menu</h3>
      [[!Wayfinder? &startId=40]]


      When it outputs then you will see some of the work you have, for instance you may have to make that area bigger, often you will make the outer space for the sidebar and then inside even have multiple small parts to keep it orderly
        • 54062
        • 18 Posts
        Quote from: nuan88 at May 31, 2018, 05:56 PM
        ;') Welcome!

        For this its pretty easy, you can use Wayfinder to get the links dynamically. With Wayfinder you can tell it go to a folder (a resource which is also a container) and get all the links there and output them. Then you can add some styling and make it perfect.

        Here's a basic link, stick it in the sidebar you've got there on the right. change the number 40 to a published resource number, make that resource a container, and just drag and drop some child resource pages right into it. They should output into that box.

        Oh, don't forget to install the Extra Wayfinder lol I forgot the most important part. And make sure those child resources are published too.

        <h3>Menu</h3>
        [[!Wayfinder? &startId=40]]


        When it outputs then you will see some of the work you have, for instance you may have to make that area bigger, often you will make the outer space for the sidebar and then inside even have multiple small parts to keep it orderly

        Hi smiley

        I will give this a try. But now another question:

        Is this dynamic? I mean, I have to do this everytime I have a new resource?

        I am asking because I want that this menu is automatically updated when the client will create other resources.
          • 3749
          • 24,544 Posts
          It's automatic unless you've told MODX not to clear the cache.

          Since the cache is cleared by default whenever you save a resource, you could call Wayfinder cached (without the exclamation point), which would give you faster page loads:

          <h3>Menu</h3>
          [[Wayfinder? &startId=40]]
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 52064
            • 120 Posts
            for menu management you can also try
            pdoTools -> pdoMenu https://docs.modx.pro/en/components/pdotools/snippets/pdomenu

            otherwise, if you want to customize the menu items manually, use the Selections function in the extra Collections

            https://docs.modx.com/extras/revo/collections
              FerX - Developer at Eracom s.r.l.
              • 54062
              • 18 Posts
              Quote from: BobRay at May 31, 2018, 11:46 PM
              It's automatic unless you've told MODX not to clear the cache.

              Since the cache is cleared by default whenever you save a resource, you could call Wayfinder cached (without the exclamation point), which would give you faster page loads:

              <h3>Menu</h3>
              [[Wayfinder? &startId=40]]

              Perfect, it works like a charm smiley

              Thanks guys.
                • 46886
                • 1,154 Posts
                Wonderful! Yes its dynamic, if you make another page (resource) that you want in that list, just drag it in the tree into that same container with the other ones, the one with the ID number in the call, and all the resources in there will be outputted!~ Pretty smooth no?

                That's the beauty of it, even after years of changes it will still output just what you want. You can delete one resource in there, put a new one in, whatever, and the user will get precisely that.

                Now if you decided you wanted like two types of links, then you would make a new call, put it below the other, probably with a new <h3> title. So the top one could be "Recent Projects" while the bottom one could be stuff like, well for example "Upcoming Projects"