>But I don't see how to use this resource plugin to get it working through my
init file
To use your own resource, you must use the option named "pluginPaths" in
your config file.
for example, in my application tree I have a folder named "resources"
containing my plugins resources.
And my config file looks like :
[production]
...
pluginPaths.Resource_ = APPLICATION_PATH "/resources"
...
resource.view.title = "My app"
I define the title of my application in my config but
Zend_Application_Resource_View does not know this option. It can configure
Zend_View and his doctype view helper, ok, that's good but not enought.
I create my resource plugin to add my application title from options :
class Resource_View extends Zend_Application_Resource_View
{
public function getView()
{
if (null === $this->_view)
{
$this->_view = parent::getView();
$options = $this->getOptions();
if (isset($options['title']))
{
$this->_view->headTitle($options['title']);
}
}
return $this->_view;
}
}
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/The-proper-current-way-to-initialize-View-in-the-bootstrap-tp2075965p2130652.html
Sent from the Zend Framework mailing list archive at Nabble.com.