Thanks i can't get the plugin working.

I have this:

bootstrap]
...
pluginPaths.resource_ = APPLICATION_PATH"/resources"
resource.view.title = 'my application'
...

and int my :

application/resources/view.php

the code like in your script.

I placed an exit; in the first line of the getView() function to test wether
the function get's called but nothing happends. What's wrong?

On Wed, May 5, 2010 at 11:00 AM, coba <[email protected]> wrote:

>  >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: Re: The proper/current way to initialize
> View in the 
> bootstrap?<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<http://zend-framework-community.634137.n4.nabble.com/Zend-Framework-f634138.html>at
>  Nabble.com.
>

Reply via email to