Adding a new view to the Zend Framework site

We took a site written as part of Zend. We did not write a site or use the Zend framework, so I am interested in finding three things.

  • How to add new views to the site by adding a new folder to the application / views / scripts directory seems to do nothing
  • Are there any tutorials on how to add feeds and settings to the zend site that you can recommend?
  • Are there any good study guides for studying structure? So far, all that I have found is a huge amount of material that confuses me.
+3
source share
3 answers

To answer your questions in order:

  • , , . script rendered. - script. , . "indexAction" index.phtml. - . :

    $view = Zend_View(); $ view- > a = "Hay"; $ view- > b = "Bee"; $ view- > c = ""; echo $view- > render ('someView.php');

http://framework.zend.com/manual/en/zend.view.controllers.html#zend.view.controllers.render

  1. , , " "... ?

  2. , , - Zend Framework, : http://www.zend.com/community/downloads. howtos, Zend .

,

+3

Zend_Controller? Zend_Controller QuickStart - MVC.

Zend_Tool, script, .

+1

, . , (, , //IndexController.php) /application/views/scripts/index/index.phtml.

example: fooAction(), /application/views/scripts/index/foo.phtml.

example: , /application/controllers/ContactController.php( index() ) /application/views/scripts/contact/index.phtml.

... , . , Zend_Layout, , - application/layouts/scripts/layout.phtml

, ZF . :

, Zend_Feed

+1

Source: https://habr.com/ru/post/1706889/


All Articles