Home > centOS, Fedora 12, PHP, Unix/Linux, Zend > Zend zend_view

Zend zend_view

Tips for the Zend_View

How to zend view?

tips 1:

Disable auto render

$this->_helper->viewRenderer->setNoRender(); //suppress auto-rendering

header(””);

echo $pdf/csv;

tips 2:

Helpers to put custom functions

default path Zend/view/helpers

tips 3:

You can tell Zend_View to look in other locations using the setHelperPath() and addHelperPath() methods

Bootstrap.php
$view = new Zend_View();
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
$view->addHelperPath('../application/views/helpers', 'My_View_Helper');
...
  /application/views/helper/GetActionDescHelper.php

views:

echo $this->getActionDescHelper($var);
Advertisements
Categories: centOS, Fedora 12, PHP, Unix/Linux, Zend
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: