Back
renderView()
1. Render a view page for a different action within the same controller.
renderView(action="edit");
2. Render a view page for a different action within a different controller.
renderView(controller="blog", action="new");
3. Another way to render the blog/new template from within a different controller.
renderView(template="/blog/new");
4. Render the view page for the current action but without a layout and cache it for 60 minutes.
renderView(layout=false, cache=60);
5. Load a layout from a different folder within `views`.
renderView(layout="/layouts/blog");
6. Don't render the view immediately but rather return and store in a variable for further processing.
myView = renderView(returnAs="string");
Copied!