5099 Posts in 1519 Topics by 1116 members
| Go to End | ||
| Author | Topic: | 2634 Views |
-
Re: Display Content from Random child Page (based on Count)

10 November 2009 at 6:49pm
Linsey,
You're not actually getting a random child of a particular page here, of course. You're getting a random instance of a particular class. That's fine if all instances share the same parent.
I've just used this code to generate a random testimonial on a home page: pretty much the same use case as you have, it appears.
I can't offer code to produce a random child right now, as I'm too trying to get a site ready. Just wanted to warn people.
Toby
-
Re: Display Content from Random child Page (based on Count)

11 November 2009 at 12:04am
I confirm this:
"You're not actually getting a random child of a particular page here, of course. You're getting a random instance of a particular class. That's fine if all instances share the same parent. "
Because tested... -
Bye
| 2634 Views | ||
| Go to Top |
