I'm trying to use the &sortby=`RAND()` option in getResources.
First time I tried it, it worked, but everytime since then i can't seem to get it to work.
Code as follows:
[[!getResources? &tpl=`homelatest` &parents=`78` &depth=`1` &limit=`1` &offset=`0` &sortby=`RAND()` &includeContent=`1` &includeTVs=`1` and &processTVs=`1` ]]
Any ideas of where I'm going wrong?
Thanks
[ed. note: markg last edited this post 11 years, 6 months ago.]
Content Creator and Copywriter
Quote from: markg at Apr 03, 2015, 02:06 AM
[[!getResources? &includeContent=`1` &includeTVs=`1` and &processTVs=`1`]]
What is your present result?
And what is the "and"doing there? I have never seen it before.
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
Don,
The present result just gives the normal result IE not randomized.
I don't know why the and is there. Probably because somebody previously told me to do it that way.
Content Creator and Copywriter
The 'and' definitely shouldn't be there.
It's now working - strangely with or without the and.
Who knows, still a win's a win.
Content Creator and Copywriter
..."And" so they worked happily ever after...the end!
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.