Unfortunately it does only work partly for me.
I have the following controller hierarchy:
Page -> HotelPage -> DefaultHotelPage -> CommentDefaultHotelPage
On DefaultHotelPage_Controller I implemented the index() function like this:
public function index(){
if($this->getField('ProvideComments') == 0){
$ssv = new SSViewer(array('HotelPage','DefaultHotelPage_Secondary'));
return $this->renderWith($ssv);
}
return array();
}
Unfortunately this seems to prevent CommentDefaultHotelPage to render with CommentDefaultHotelPage.ss. Any ideas how this may be fixed?
I tried with different return values and even an empty index file. But as soon as I put the index file there SSViewer goes crazy.