mi553
mi553

Reputation: 35

Zend static helper

In my Bootstrap.php file I have the following code

$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
    if (null === $viewRenderer->view) 
    {
        $viewRenderer->initView();
    }

    $view = $viewRenderer->view;

    $view->assign('CSS_PATH', 'path/to/css');

In layout.phtml I am able to access $this->CSS_PATH but in controllers not. So how to access it in any controllers ?

Upvotes: 2

Views: 486

Answers (1)

Mr Coder
Mr Coder

Reputation: 8186

In controllers do

echo $this->view->CSS_PATH ;

Upvotes: 4

Related Questions