I am currently trying to understand the render() and renderPartial() functions.
I have a layout file, lets say with a header, a footer, a content (as $content) and three flexible content boxes for e.g. recent News or this kind ($box1, $box2, $box3). These boxes can be filled with whatever.
Now we have Views, Widgets and Portlets. And here are my questions:
As far as I understood will the view be taken automatically from the controller’s method name (e.g. Edit), be rendered by calling render() and be put into $content. This is what happens automatically, right? I don’t have to specify where the view should be put into.
But what about the boxes? Do I have to run renderPartial(), receive the output into a variable as string and then hand over to the render() method as parameters?
So what you are saying is that I have to run renderPartial() inside the view file for each box I want to render and render() inside the controller?
What I understand is that renderPartial() will not put the defined layout around. So if I run renderPartial(‘Edit’) the ‘Edit’ view will be shown without a layout or just rendered and “prepared” for output in a layout?
For me it’s really difficult to understand as I have a very different thinking seems.