Hi,
I'm using Zend_view/Zend_Layout but i want to be able to append scripts to the overall template depending on the controller, so within the controller i could do something like:
public function someAction()
{
$something->headScript()->appendFile('script.js','text/javascript');
// etc etc
}
I have enabled Zend_view/Zend_Layout like this:
in application.ini:
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
and in Bootstrap.php:
protected function _initView()
{
$view = new Zend_View();
$view->doctype('XHTML1_STRICT');
$view->headTitle('zend layout tester');
// Add it to the ViewRenderer
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper(
'ViewRenderer'
);
$viewRenderer->setView($view);
// Return it, so that it can be stored by the bootstrap
return $view;
}