I have a "folder" wich cantain many documents.
In home page I must show a random document. This random document must be one oh the last 10 inserted.
I try many ditto call... But When i user &randomize ditto randomize from all documents in the folder...
help me please.
Thank you...
This is the ditto call:
[!Ditto? &parents=`53` &display=`1` &total=`10` &sortBy=`pub_date` &sortDir=`DESC` &randomize=`1` &debug=`1`!]
And this is the debug...
Basic Info
Version 2.0.2
Summarize 1
Total 5
Sort By RAND()
Sort Direction DESC
Start 0
Stop 1
IDs 3868, 3871, 3876, 3890, 3906, 3912, 3917, 3920, 3922, 3924, 3928, 4097, 4106, 4107, 4132, 4135,
4136, 4137, 4138, 4139, 4140, 4141, 4142, 4143
Parameters
debug 1
display 1
parents 53
randomize 1
sortBy pub_date
sortDir DESC
total 5
I don’t underst whay ditto select all ID...
I hae try queryLimit but the result is the same....
So my problem is not solved...
Any idea?
-
MODX Staff
- 12,272 Posts
Update to the latest Ditto 2.1 release available for now at ditto.modxcms.com (pending the release announcement text). I think 2.0.2 didn’t work so well in the randomization department.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Now I’m using 2.1 but the problem remain.
Can Ditto select only if a TV is set to 1? If yes I can add a TV ad set to 1 only if it must be in my home and randomize this select...
Can I have an exaple of ditto call with a TV?
Thanks.
Wonderfull! I can use dito to call a snippet output... !! This solve anyproblem! THANKS!! Great support!