Hi
I'm using getresources to list a bunch of products in order of creation date. All fine.
But I want to add a way that users can change the sorting - ie if they want it alphabetical Asc, or by a tv etc.
I just wondered if anyone has a good way to achieve this.
Thanks
Andy
I use something like this
News
[[!getResources? &parents=`9` &limit=`3` &tpl=`newsTpl` &sortby=`createdon` &sortdir=`DESC` &includeTVs=`1`]]
Archive
[[!getResources? &parents=`9` &limit=`0` &tpl=`newsTpl` &sortby=`createdon` &sortdir=`DESC` &includeTVs=`1`]]
creates an html form with select to sort choice.
using an extra (eg. getUrlParam) or your snippet to retrieve GET parameter
Use the value to customize the options getResource
FerX - Developer at Eracom s.r.l.