I have project-range meta tags that are need to be set.
I've put them in protected method _initMeta
in Bootstrap
class.
Are there any better options? What if I would like different set of this data for another languages?
protected function _initMeta(){
$this->bootstrap('view');
$view = $this->getResource('view');
$view->doctype('XHTML1_STRICT');
$view->headTitle()->headTitle('Foo title');
$view->headMeta()->appendName('keywords','foo');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
->appendHttpEquiv('Content-Language', 'any');
$view->headLink()->appendStylesheet('/foo.css')->headLink(array('rel' => 'favicon',
'href' => '/favicon.ico'),
'PREPEND');
}
I use config for basic (bootstrap) data as:
application.ini
At this point, maybe you have some special data. For example in:
project1.ini
And finally, you mix all in your
Bootstrap.php
(example for *_initHeadLink()*):
Then, you can override these data from your Controller: setName, set...
I hope it helps ;)