Zend Framework Intro: Creating ViewTag: framework, zend, zend framework, access file, view, MVC Category: PHP Frameworkpost: 09 Apr 2008 read: 2,029 Zend Framework Step By Step Tutorial - Part 6: Now, we need to provide a view template for displaying. We will create a index.phtml file. This file is stored within the views/scripts/index. We have a separate directory for each controllers view templates. Create a file named "index.phtml" within views/scripts/index. Enter following code:
The template file is executed within a member function of Zend_View and so $this is available within the template file wich is the gateway to Zend_View's functionality. All variables that have been assigned to the view from within the controller are availabel directly as properties of $this. You can see sample at above, $this->title. |
| | Give Your Opinion | Recommend |
|

