hi everyone,
i'm pretty new to processwire and trying to figure out if pw is a replacement for contao in same use cases.
so many interesting concepts - but still not to easy to set up a page with sections and all that ?
anyway:
i am able to output all children of a given page by their template:
// only templates starting "section_"
$tpls = $templates->find("name^=section_");
foreach ($page->children("template=$tpls") as $child){
$content .= $child->render();
}
these children were insertet by a pagetabel field and they are rendered as expected.
if i try to do that using the pagetable object, it does not work:
if ($page->pagetable) {
foreach ($page->pagetable as $pt) {
$content .= $pt->name .'<br>'; // works
$content .= $pt->id .'<br>'; // works too
$content .= $pages->find('id=' . $pt->id)->render(); // returns a formatted link ... ?!
}
}
surprisingly that only give's me a link to the child page instead of display it's contents.
anyone to guide me... ?