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

    I have a navigation system such as this:

    Folder
    - Sub Folder
    - Sub Folder
    - document
    - document
    - document

    I want to use WayFinder to bring only up the Sub Folders and not the documents. I can’t seem to figure out how to do that. It always seems to display the documents as well.

    Is this possible? Or would I have to manually exclude each of the documents in the WayFinder call?

    Thanks!
      • 8609
      • 607 Posts
      just add &depth=`1`, so it will only look one level deep and just add the subfolders and not their children.
        • 33997
        • 150 Posts
        You have a few options.

        1. You could uncheck the ’Show in Menu’ checkbox for the documents, making it so that WF won’t put them up unless you tell WF to ’ignoreHidden’ using the parameters.
        2. You can use &excludeDocs to pull those documents out of the mix.
        3. You can specify in your WF call all of the ’parentRow’ templates and have chunks with their layout code in them, and then for the regular documents, make it blank (i.e. your hereTpl, rowTpl, etc. look at the documentation).
        4. You can add in ’rel="category"’ for all the documents and then call that template, but leave the call blank so it doesn’t output anything.
        5. If you can figure out how to add in all the necessary code, you can create a whole new TPL call and have the call be blank. I wrote about this (kind of!), but I couldn’t figure out how to add in more options, and since I wasn’t using categoryFolderTpl, I just used that. Here’s the link: http://modxcms.com/forums/index.php/topic,61155.msg347828.html#msg347828

        I think 3 would work best, as it would be automatic and you wouldn’t get any extra code dropped onto your page. I don’t know of any way to do this automatically. Another option is to put all the documents you don’t want showing up anyways into another folder. I keep a ’Not In Menu’ folder for items that I don’t want cluttering up my tree - if you don’t want them showing up in WF, do you have any reason for having them in your top level?

        Wayfinder wiki for additional help: http://wiki.modxcms.com/index.php/Wayfinder
          "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
          • 36442
          • 97 Posts
          If you’re using MODX Revolution, you can add &where=`{"isfolder:=":"1"}` parameter to Wayfinder call to show only resources that are folders.
            • 10395
            • 96 Posts
            Quote from: Warsteiner at Apr 11, 2011, 07:27 AM

            If you’re using MODX Revolution, you can add &where=`{"isfolder:=":"1"}` parameter to Wayfinder call to show only resources that are folders.

            That worked perfectly! Thanks!

            The reason I wanted it, was because I was displaying the documents lower in my page, and wanted the subfolders only to be listed as a submenu above the documents.