We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36626
    • 51 Posts
    Hello,
    I'm generating a list of thumbnails using getPage. Does anyone know of a way to allow users on the client side to change the sort criteria using say a select box or radio inputs? The use case here is for a product catalog.

    Any input is greatly appreciated.

    thanks
      • 4172
      • 5,888 Posts
      you can use a snippet which gets the url-param of your listbox, for example getReqParam and put it into the
      sortby - property of you snippet-call.

      I don't know the properties out of my head, something like:

      &sortby=`[[getReqParam? &param=`yourSelectBoxParam`]]`
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36626
        • 51 Posts
        Quote from: bodhic at May 17, 2013, 08:44 AM
        Hello,
        I'm generating a list of thumbnails using getPage. Does anyone know of a way to allow users on the client side to change the sort criteria using say a select box or radio inputs? The use case here is for a product catalog.

        Any input is greatly appreciated.

        thanks

        Quote from: Bruno17 at May 17, 2013, 09:10 AM
        you can use a snippet which gets the url-param of your listbox, for example getReqParam and put it into the
        sortby - property of you snippet-call.

        I don't know the properties out of my head, something like:

        &sortby=`[[getReqParam? ¶m=`yourSelectBoxParam`]]`

        Thank you. I'll see if I can make something like this work.
          • 36626
          • 51 Posts
          It seems like this is probably the best way to go about this, but I can't get the snippet to grab select box param. My goal is to enable users to sort alphabetically, recently added and possibly a price variable.