Jump to content

MarkupPageFields repeater missing


interrobang
 Share

Recommended Posts

I am trying to output all content of all my pages on a single page to get a quick overview where some content is still missing. It doesn't have to be pretty, and the resulting output of the MarkupPageFields.module is sufficient for my purpuse, but I am missing the content of my repeater field.

Is there anything simple I can do to include my repeaters fields?

This is basically my code:

function listPageFields($page) {
echo "<h1>{$page->title}:</h1>";
echo $page->renderFields();

if($page->numChildren) {
	foreach($page->children as $child) listPageFields($child);
}
}

listPageFields($pages->get('/'));
Link to comment
Share on other sites

Not sure if this works, but let's assume your repeater field is called "repeater":

function listPageFields($page) {
    echo "<h1>{$page->title}:</h1>";
    echo $page->renderFields();
    foreach($page->repeater as $p) {
		    echo $p->renderFields();
    }
    if($page->numChildren) {
		    foreach($page->children as $child) listPageFields($child);
    }
}
listPageFields($pages->get('/'));
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...