public setVar (mixed $key, mixed $value) Set a single view parameter $this->view->setVar('products', $products);
public setTemplateBefore (mixed $templateBefore) Sets a template before the controller layout
public setTemplateAfter (mixed $templateAfter) Sets a “template after” controller layout
public setRenderLevel (mixed $level) Sets the render level for the view //Render the view related to the controller only $this->view->setRenderLevel(View::LEVEL_LAYOUT);
public setPartialsDir (mixed $partialsDir) Sets a partials sub-directory. Must be a directory under the views directory. Depending of your platform, always add a trailing slash or backslash $view->setPartialsDir('../common/partials/');
public setParamToView (mixed $key, mixed $value) Adds parameters to views (alias of setVar) $this->view->setParamToView('products', $products);
public setMainView (mixed $viewPath) Sets default view name. Must be a file without extension in the views directory //Renders as main view views-dir/base.phtml $this->view->setMainView('base');
public setLayoutsDir (mixed $layoutsDir) Sets the layouts sub-directory. Must be a directory under the views directory. Depending of your platform, always add a trailing slash or backslash $view->setLayoutsDir('../common/layouts/');
public setLayout (mixed $layout) Change the layout to be used instead of using the name of the latest controller name $this->view->setLayout('main');
public setContent (mixed $content) Externally sets the view content $this->view->setContent("<h1>hello</h1>");
Page 65 of 382