(Yaf >=1.0.0)
Yaf_Controller_Abstract::setViewpath — Set the view path
Sets the template directory of the view engine bound to this controller.
view_directoryThe directory that holds the view templates.
Example #1 Yaf_Controller_Abstract::setViewpath() example
<?php
class ProductController extends Yaf_Controller_Abstract
{
public function init() {
// from now on templates of this controller are looked up
// under application/themes/dark/views/
$this->setViewpath(APPLICATION_PATH . "/themes/dark/views");
}
public function indexAction() {
// renders application/themes/dark/views/product/index.phtml
$this->display("product/index.phtml");
}
}
?>