public function init() { parent::init(); try { $this->_locale = Zend_Registry::get('Zend_Locale'); } catch (Exception $e) { $this->_locale = new Zend_Locale('en'); Zend_Registry::set('Zend_Locale', $this->_locale); } $this->view->locale = $this->_locale; $this->_translate = $this->initTranslation(); $this->view->setScriptPath(array_merge($this->view->getScriptPaths(), array(PIMCORE_WEBSITE_PATH . '/views/scripts/', PIMCORE_WEBSITE_PATH . '/views/layouts/', PIMCORE_WEBSITE_PATH . '/views/scripts/blog/'))); // additional helpers $this->_helper->addPrefix('Modern_Controller_Action_Helper'); $this->view->addHelperPath('Modern/View/Helper', 'Modern_View_Helper_'); $this->_messenger = $this->_helper->getHelper('FlashMessenger'); Modern_View_Helper_FlashMessenger::setPartial('partial/messenger.php'); Zend_View_Helper_PaginationControl::setDefaultViewPartial('partial/paginator-search.php'); // fix main blog list pagination if (!Staticroute::getCurrentRoute() instanceof Staticroute) { Staticroute::setCurrentRoute(Staticroute::getByName('blog')); } }
/** * Set messenger partial view script. * * Path must be relative to one of the registered view script paths. * * @param string $partial */ public static function setPartial($partial) { self::$_partial = $partial; }