Random Adverts
This is an open discussion with 4 replies, filed under General.
Search
Just thinking on, this may become more complex, as I may end up with the same advert more than once, when I would want 3 unique ads out of say 10.
Is it possible for this to be automated?
Possible solutions:
- Put the all in the source and use JS to randomly hide 7
- Use a custom DS to give 3 randomly chosen in the
XML
- Have a DS provide you with all 10 in the
XML
, and useXSLT
to randomly choose 3
Hmm, the third seems more likely for my skills.
But I believe there is no random function in XSLT.
This thread might be useful:
Create an account or sign in to comment.
Not sure if this was answered sufficiently before, but basically I have an unordered list, that just displays 3 generated records. What I want to do is show any 3, if I have 10 records, I want it to show any 3 in a random manner. Is there not a method for doing this?