Jump to content

Repeaters using $repeater->render()


Soma
 Share

Recommended Posts

I'm trying to render repeater using the $page->render("path/to/template.php") method.

Like this:

echo $slider->render($config->paths->templates . "views/_slider.php");

But I'm getting an error 

Error:     Exception: Template file does not exist: '/home/updatepu/www/reitsimulator.ch/site/templates/repeater_repeater_slider.php

When I create a repeater_repeater_slider.php file in the templates folder my code works and it's using the /views/_slider.php correctly

Why is this and can we prevent that error?

Link to comment
Share on other sites

It seems like we should be able to change that behavior but I can't initially figure out why it's not accepting your argument to the render() method. Just to be clear, $slider is an individual Page (rather RepeaterPage) and not a PageArray? And the render() method is intended to be Page::render? One possible factor may be that repeater pages have their own class: RepeaterPage rather than Page, and this might be interfering somewhere along the line, but not yet deep enough in the code to see where. 

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