Rustin wrote:
> 
> I'm trying add an alternative view helper path without call addHelperPath
> in all my controllers neither include my helpers directory in the include
> path. Of course, I don't wanna inject code into the native classes.
> There's a 'politically correct' way to provide this?
> 

Two ways I know of...
1) Include it in your bootstrap file:

$viewRenderer =
Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
// Initialise the view to setup additional helper paths
$viewRenderer->initView();
// view helper plugins
$viewRenderer->view->addHelperPath('SiCo/helper/view', 'SiCo_Helper_View');

2) Include it in a plugin (in preDispatch?):

$view =
Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer')->view;
$view->addHelperPath('SiCo/helper/view', 'SiCo_Helper_View');

Hope this is what you're after and helps.

-----
Simon Corless

http://www.ajb007.co.uk/
-- 
View this message in context: 
http://www.nabble.com/Add-alternative-view-helper-path-tp16364557p16367331.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to