The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 1596a779 authored by Demian Katz's avatar Demian Katz
Browse files

Changed default headTitle behavior.

parent 54b1ee21
No related merge requests found
......@@ -66,6 +66,7 @@ class Bootstrap
{
$this->initAccount();
$this->initContext();
$this->initHeadTitle();
$this->initTheme();
}
......@@ -107,6 +108,24 @@ class Bootstrap
$this->events->attach('dispatch', $callback);
}
/**
* Set up headTitle view helper -- we always want to set, not append, titles.
*
* @return void
*/
protected function initHeadTitle()
{
$callback = function($event) {
$serviceManager = $event->getApplication()->getServiceManager();
$renderer = $serviceManager->get('viewmanager')->getRenderer();
$headTitle = $renderer->plugin('headtitle');
$headTitle->setDefaultAttachOrder(
\Zend\View\Helper\Placeholder\Container\AbstractContainer::SET
);
};
$this->events->attach('dispatch', $callback);
}
/**
* Set up theme handling.
*
......
......@@ -5,10 +5,7 @@
// Override some details...
// Set up page title:
$this->headTitle(
$this->translate('Author Search Results'),
Zend_View_Helper_Placeholder_Container_Abstract::SET
);
$this->headTitle($this->translate('Author Search Results'));
// Set up empty search box:
$this->layout()->searchbox = $this->render('search/searchbox.phtml');
......
......@@ -13,10 +13,7 @@
// Override some details...
// Set up page title:
$this->headTitle(
$this->translate('Author Browse'),
Zend_View_Helper_Placeholder_Container_Abstract::SET
);
$this->headTitle($this->translate('Author Browse'));
// Set up empty search box:
$this->layout()->searchbox = $this->render('search/searchbox.phtml');
......
......@@ -5,8 +5,5 @@
// Override some details...
// Set up page title:
$this->headTitle(
$this->translate('Author Search Results'),
Zend_View_Helper_Placeholder_Container_Abstract::SET
);
$this->headTitle($this->translate('Author Search Results'));
?>
\ No newline at end of file
......@@ -10,8 +10,5 @@
// Override some details...
// Set up page title:
$this->headTitle(
$this->translate('Author Browse'),
Zend_View_Helper_Placeholder_Container_Abstract::SET
);
$this->headTitle($this->translate('Author Browse'));
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment