Usually, I just place myself such variables into application bootstrap file. Here's an example:
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {
protected function _initViewVariables() {
$this->bootstrap('View');
$this->view->fooValue = 'foo';
$this->view->barValue = 'bar';
$config = Zend_Registry::get('config');
if( $config->recaptcha->enabled ) {
$this->view->captcha = true;
$this->view->recaptchaPublicKey = $config->recaptcha->publicKey;
}
else {
$this->view->captcha = false;
}
}
}
I hope it helps!