renderPartial() within a layout?


I am trying to render a view within my layout but I dont get it working.



<?php echo $content; ?>

<!-- Some code -->


<?php $this->renderPartial(’_myViewFile’); ?>


<!-- Some code -->


I expected that ‘_myViewFile’ is beeing searched within the directory ‘themes/classic/views’ - But the file is beeing searched within the view directory which is determined by the current active controller / module.

I now used $this->renderFile() and used the absolute path to the file - But it seems wrong. What do i miss?

read this

You have also the // for the views, to go to the "base" of the views and start building the path from it

also you need to set the theme , for this you can use my theme picker, see in signature

I am through this… I still dont get the solution… The theme is set and working!

My friend, it’s very simple. Use $this->renderPartial(’/layouts/_partial’);

Also :

So, it’s better to use double slashes :