2

Thats basically my code (simplified):

class IndexController extends Zend_Controller_Action
{
    public function indexAction(){
        $this->view->setBasePath(APPLICATION_PATH . '/views/partner/xyz/');
        $this->view->render('node.phtml');
    }
}

Now what I (obvoiusly) want is to use the view script APPLICATION_PATH . '/views/partner/xyz/node.phtml' but ZF always tries to load APPLICATION_PATH . '/views/partner/xyz/scripts/node.phtml' is there any Way around that Behviour?

Hannes
  • 8,147
  • 4
  • 33
  • 51

2 Answers2

3

You can set the path to the view tih the setScriptPath method.

class IndexController extends Zend_Controller_Action
{
    public function indexAction(){
        $this->view->setScriptPath(APPLICATION_PATH.'/views/partner/xyz');
        //$this->view->setBasePath(APPLICATION_PATH . '/views/partner/xyz/');
        $this->view->render('node.phtml');
    }
}
Rene Terstegen
  • 7,911
  • 18
  • 52
  • 74
  • omg ... thaaanks ... sometimes I can't believe how blind I am xD now I remember that I already had that issue some months ago and solved it and then completely forgot about it - apparently – Hannes Jan 04 '11 at 13:03
0

I need to change the script path, not just view path:
public function setScriptPath($path);

Alex Pliutau
  • 21,392
  • 27
  • 113
  • 143