Jump to content

Rendering child templates in parent


Manaus
 Share

Recommended Posts

Hello,

I have a page with children pages. Pages have parent.php and child.php as template files. I'd like to use child template in parent page to render the content, I tried

foreach ($children as $child): 
  $child->render();
endforeach;

but it did not work.

Tried also

foreach ($children as $child):
  include 'child.php';
endforeach;

without appreciable results.

Thanks for any suggestion!

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...