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

    I am trying to use Wayfinder to make a menu that can be filtered. I have some questions that I think I need answered that will determine if this is possible:

    1) Is it possible to write Wayfinder calls where the parameters are themselves variable?

    For instance, I have a folder of ’projects’ and depending on what category of project has been chosen I would like to only select a certain range of documents. I figure I can use the &includeDocs parameter, but I can I set this dynamically somehow?

    2) Also I would need to be able to order the Wayfinder results by a Template Variable that each project document has, such as ’year’. Is this possible at all?

    Any help would be greatly appreciated.

    MODx is fantastic, but I’m still learning!

    AJ
      • 36747
      • 138 Posts
      I’m trying to do the same filtering by a TV. No results yet, but as this is MODx I’m sure there’s a way to do it smiley
        patagonia, argentina
        • 7231
        • 4,205 Posts
        1) Is it possible to write Wayfinder calls where the parameters are themselves variable?
        Yes, you can use a snippet as a parameter. There was a recent post with the exact problem you describe, I will see if I can find it.

        http://modxcms.com/forums/index.php?topic=19432.0

        2) Also I would need to be able to order the Wayfinder results by a Template Variable that each project document has, such as ’year’. Is this possible at all?
        I don’t thin that filtering is possible without some ’hacking’ of the source files. To use a tv as part of the display you can embed a GetFiled snippet call in the chunks to extract the desired info.

        http://modxcms.com/forums/index.php/topic,18554.msg128199.html#msg128199

        Ditto can filter by various different options.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]