Hi.
I just encountered a strange behaviour of template renderer.
My Page_Controller looks as follows:
class Page_Controller extends ContentController {
function xml() {
$this->getResponse()->addHeader('Content-Type', 'application/xml; charset="utf-8"');
return array();
}
}
And then I have several page types extending both Page and Page_Controller, so I can use different templates. But for a strange reason one of my subclasses does not find an existing template.
I have templates/Page_xml.ss template that looks like these:
<page id="$ID">
$Layout
</page>
And in templates/Layout folder, for example:
ExamplePage.ss
ExamplePage_xml.ss
TestPage.ss
TestPage_xml.ss
When calling example-page/xml, it renders correctly using Page_xml.ss and Layout/ExamplePage_xml.ss
But for a strange reason one of my subclasses, let's say TestPage, cannot find an existing TestPage_xml.ss template, so it renders using Page_xml.ss and then TestPage.ss (not TestPage_xml.ss).
Every other class in the project works perfectly.
I triple checked everything for typos and anything. Does anyone encountered this problem?
I tried deleting the pages, the classes, rebuilding the database, flushing templates - no can do, my existing TestPage_xml template is simply ignored.
What could I miss?