Hieunv (1) [Avatar] Offline
Dear Author and readers.
I am a new member of PHP and Zend framework.
I am studying Zend Framework in Action but i don't understand at "3.3 Two-Step View".
in this section, i don't know where can (or must) i place the code snip:

public function dispatchLoopStartup( Zend_Controller_Request_Abstract $request)
$viewRenderer = Zend_Controller_Action_HelperBroker::
if (is_null($viewRenderer->view)) {
$viewRenderer->init(); #1
$this->_view = $viewRenderer->view;

// add View/Helper directory to path
$prefix = 'Places_View_Helper'; #2
$dir = dirname(__FILE__) . '/../../View/Helper'; |#3
$this->_view->addHelperPath($dir, $prefix); |

.... to make this sample run.
Can you help me to make a complete sample of this chapter that can run with ZendFrameWork version 1.7.1

Thanks and best regards

Nguyen Van Hieu
email: catbienthanhhoa@gmail.com
akrabat (479) [Avatar] Offline
Re: Chapter 3: Building a web site with the Zend Framework

Read my tutorial here: http://akrabat.com/zft

The two-step view is now done using Zend_Layout in later versions of ZF.