Jump to content

Render doesn't seem to be working


BUCKHORN
 Share

Recommended Posts

I'm not sure why I can't get render() to work. The include works so I know the path is correct. Any ideas?

//assign page
$page = $pages->get('name|domain_alias='.$host);

//redirect to 404 if we can't find a website that matches the host
if(empty($page)) {
    print '<h1>Page Not Found</h1>';  
}

//render child pages
foreach($page->children as $child) {
    include ($config->paths->templates.$page->theme[0]->name.'/'.$child->template.'.php');
    $child->render($config->paths->templates.$page->theme[0]->name.'/'.$child->template.'.php');
}
Link to comment
Share on other sites

Thank you both for the help.

Soma, I was going to have to hunt this down, I couldn't remember how it was done. Thanks.

I tried render w/o the custom template path and still nothing. No error, just white screen. I don't even get an error when I remove the template.

I echoed $child->title and it's populated so I do have child pages.

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