Zend Framework changin the view
Posted: Tue Dec 04, 2007 5:17 am
I am learning the Zend Framework and my first major change to it is using a different view class (not Zend_View).
So I went and got: http://framework.zend.com/wiki/display/ ... w+Ratzloff
which is great. I got everything working actually (wow) but I have a problem. If you are just using the Zend_View then you can be like:
Then you can access some_var in your template. Now I want to be able to do that with the Zend_View_Phptal. Currently I have to do this:
I have to do that each time. How do I set it up so the view all over zend framework is the Zend_View_Phptal instead of Zend_View?
So I went and got: http://framework.zend.com/wiki/display/ ... w+Ratzloff
which is great. I got everything working actually (wow) but I have a problem. If you are just using the Zend_View then you can be like:
Code: Select all
$this->view->some_var = $something_else;Code: Select all
$this->view = new Zend_View_Phptal;
$this->view->setScriptPath('/very/long/path/');
$this->view->test = 'value of variable';
echo $this->view->render('index.html');