We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20264
    • 15 Posts
    Can I give my news page visitors the ability to re-sort the latest news headlines by other criteria if they wish, subject or date for example or even both.
    With Ditto? or should I be looking at something else?
    Thanks
    m
      • 20264
      • 15 Posts
      On reflection I suspect I should be looking at AjaxSearch for the answers to this.
      m
        • 7231
        • 4,205 Posts
        Yes you can. There are a few options on how to do this:
        1) Ditto has the Request Extender which will allow you to send parameter values via the url string. Then you can make the links href="[~[*id*]~]&ditto_sortDir=ASC.

        2) Use a wrapper snippet to provide the interface between the snippet and the user input. Here is an article on building a wrapper snippet, you can adapt that to work with Ditto.

        3) Use utilty snippets as input values for Ditto. You can build simple snippets to prepare the input values: &sortBy=`[!getSortValue!]` &sortDir=`[!getSortDir!]`.
          [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]
          • 20264
          • 15 Posts
          thanks for that advice.
          I will give it a go. Sounds a bit out of my depth though. Maybe option 1 is the easiest to get my head around.
          m