Jump to content

danielsl

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by danielsl

  1. i have a page with similar repeater fields of various names, and similar output in a loop so i really don't really want to write endless foreach repeater for rendering but need to aggregate all repeater fields and then pass them via one foreach loop $repeaters=$pages->get("/advert_page/"); foreach($repeaters->fields as $repeator){ if($repeator=="title")continue; echo $repeator->summary; echo $repeator->images->first; } it simply doesnt work, so i have to manually do for each repeater $repeater=$pages->get("/advert_page/"); foreach($repeater->Media as $m) { echo "<img src='{$m->images->first()->size(120, 60)->url}'>"; echo "<p>Year built: {$m->summary} </p>"; } echo '</div><div class="uk-grid uk-grid-width-medium-1-4" data-uk-grid-margin="">"'; foreach($repeater->featured as $m) { echo "<img src='{$m->images->first()->size(120, 60)->url}'>"; echo "<p>Year built: {$m->summary} </p>";
×
×
  • Create New...