We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27330
    • 884 Posts
    Is there any way that links will be automatically generated & visible on the parent folder page when a new page is published, without seeing them in the menu bar?

    I want to have a section for lots of article that just sorted in list 1 by 1.
    in the current setup I create a new documents and check the box "Show in menu" , then I can click the link in WayFinder and get the post id....
    now I’ll go back and edit my page+folder named "Articles" with a link to the post id.
    and I need to repeat the process every time I post something new...

    am I doing something wrong? smiley
    do I need to add some plugin/snippet or anything?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Why not use Wayfinder in the parent folder document, with its startId the ID of the parent document, and the level set to 1?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 27330
        • 884 Posts
        Thanks Susan for the tip!

        I’ve added [[Wayfinder? &startId=`38`&limit=`1`]] to the content of the Parent folder, the result can be seeing here, just like I would expect:



        the only annoying thing is that by checking the "Show in menu" box the links also visible in the submenu of wayfinder on the header. that will be messy when if u have large amount of articles/pages.
        any idea if I can disable the links generation on the header menu bar while leaving it on the html in the parent folder?
        does this make sense?
          • 7923
          • 4,213 Posts
          Uncheck the show in menu for the documents and add &ignoreHidden=`1` to wayfinder call.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 27330
            • 884 Posts
            Ok I think I got it wink
            Wayfinder docs were a good start.

            I changed me AlexHeader to:
            [[Wayfinder?&startId=`0’&limit=`2`&hideSubMenus=`1`&level=`1`&outerClass=`nav`&innerClass=`subnav`]]

            I hoped that &hideSubMenus=`1` will do what I want, but I had to limit &level=`1` to show only top bar.

            so now I have only "main" bar in the header without the submenus- i like it that way better.

            and I left the code on my parent folder as [[Wayfinder? &startId=`38`&limit=`1`]] which generates the links in a nice way, as a list.

            but what if I wanted to edit the list to have two columns instead of one?
            am I asking too much from Wayfinder?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              You can force a two-column list using CSS to limit the width of the container of a horizontal display, but it will be

              1 2
              3 4
              5 6

              etc.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 27330
                • 884 Posts
                thx again Susan
                that’s sounds good, at least better then the current list.
                can you advice what are the changed I’ll need to do?