Jon E Posted February 10, 2017 Posted February 10, 2017 Hi there, Am really stuck on this one and I had a look around but couldn't work this out still. I have a repeater field (screenshot attached) - and I want to run a command such as: <?php echo $page->homepage_media->getRandom()->video_strip_1->url ?> <?php echo $page->homepage_media->getRandom()->video_strip_2->url ?> <?php echo $page->homepage_media->getRandom()->video_strip_3->url ?> <?php echo $page->homepage_media->getRandom()->video_strip_4->url ?> <?php echo $page->homepage_media->getRandom()->video_strip_5->url ?> So I want all random links output individually but all from the same repeater entry. Does that make sense? Sorry would appreciate any help.
LostKobrakai Posted February 10, 2017 Posted February 10, 2017 <?php $entry = $page->homepage_media->getRandom(); echo $entry->video_strip_1->url; echo $entry->video_strip_2->url; echo $entry->video_strip_3->url; echo $entry->video_strip_4->url; echo $entry->video_strip_5->url; 1
Jon E Posted February 10, 2017 Author Posted February 10, 2017 God, that simple. Sorry and thank you.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now