Hi,
I'd like to build a dynamic page, where I can define rows and coloumns, with bootstrap.
I have implemented bootstrap and everything is working fine, I'm just a bit confused how to output a page inside a page.
The reason I want to do this is because you can't have repeaters inside repeaters as I have read. So I thought i do it this way:
homePage
-- homePageContent
-- -- row-divs
-- -- row-slider
-- -- row-etc
For example, the row-divs is a template with a repeater, made out of a Fieldset with Title + Text.
the row-divs is a template, where I loop through the repeater, dynamicly calculating the "col-md-x" size and limiting the divs per row.
Now my problem is, that I want to output the whole page with the template "row-divs" in homePage.
Pseudocode:
$subPages = $page->children('title=homePageContent")->first;
foreach($subPages as $subPage):
echo $subPage;
endforeach;
This should output row-divs, etc the way it would be outputted as single page, like:
<row>
-- <div 1>
-- <div 2>
</row>
<row>
-- <div 1>
-- <div 2>
-- <div 3>
</row>
if e.g. there are 2 pages in homePageContent with row-divs template, one with 2 divs and one with 3 divs.
I know I could achieve this by outputtung the fields of the children by hand, but I pretty sure processwire is able to output a page in a page formatted with its template, but I couldn't find it in the docs...
Thanks