Open kelly8116 opened 6 years ago
Is there any way to randomize migxLoopCollection similar to getImageList?
I've tried multiple combinations:
[[!migxLoopCollection? &packageName=`testimonials` &classname=`Testimonial` &tpl=`testimonialTpl` &where=`{"published" : "1"}` &randomize=`1` &offset=`0` &limit=`1` ]]
[[!migxLoopCollection? &packageName=`testimonials` &classname=`Testimonial` &tpl=`testimonialTpl` &where=`{"published" : "1"}` &limit=`1` &sortby=`RAND()` ]]
[[!migxLoopCollection? &packageName=`testimonials` &classname=`Testimonial` &tpl=`testimonialTpl` &where=`{"published" : "1"}` &limit=`1` &sortConfig=`[{"sortby":"RAND()"}]` ]]
Additionally, nothing seems to change the sort order.
This should work: &sortConfig=[{"sortby":"RAND()","sortdir":"ASC"}]
[{"sortby":"RAND()","sortdir":"ASC"}]
That way the chosen field is randomised, giving you a differed order, the more columns/fields you have the more random it looks.
Is there any way to randomize migxLoopCollection similar to getImageList?
I've tried multiple combinations:
Additionally, nothing seems to change the sort order.