Jump to content

Reclus

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,289 profile views

Reclus's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. After a bit more learning and poking around the forum I managed to solve this. Here's the working code I ended up with - just in case it helps anyone else. <?php $lineup = $pages->find("template=festival"); // my template foreach($lineup as $acts) { foreach($acts->festival as $field) { // my repeater field echo "{$field->repeater_heading}"; echo "{$field->repeater_body_content}"; }} ?>
  2. Thanks wbmnfktr. I have had partial success by tweaking my original code as so ... <?php foreach($page->child->repeater_1 as $field) { echo "{$field->repeater_heading}"; echo "{$field->repeater_body_content}"; }?> However, this only works for the first child page, so not ideal. I will take a closer look at your suggested code now, thanks again.
  3. Hello, there is probably a really simple solution to this but I can't find it ? I want to use an individual repeater on a number child pages and have their content displayed on the parent page, so something like this. - home (repeater_1 and repeater_2 content appears here) - childpage_1 (repeater_1) - childpage_2 (repeater_2) The following repeater code works as intended but only if the repeater is used in the parent page. <?php foreach($page->repeater_1 as $field) { echo "{$field->repeater_heading}"; echo "{$field->repeater_body_content}"; }?> Thanks in advance.
  4. Thanks very much Adrian, this has helped a great deal. I now have the code working , I ended up with this ... <?php foreach($page->children as $item) { foreach($item->tags as $item) { echo '<li>' . $item->title . '</li>'; } } ?>
  5. Hello. I'm trying to call the results of a child field into its parent page. The field is using the Select Options field with multiple check-boxes. I'm struggling to write workable code, I currently have this (see below) which doesn't work but may help explain what I am hoping to achieve ... thanks in advance. <?php foreach($page->children as $item) { echo '<p>' . $item->tags . '</p>'; } ?>
×
×
  • Create New...