views:

38

answers:

3

I use customized paths for my application based on Zend Framework (a.k.a. themes).

The view scripts are saved in public/themes/themename/modulename/..., so switching the application theme is just substituting themename in the path.

How to tell Zend Tool to generate the view scripts in this directory instead of the default one? I suppose some kind of provider is needed?

How to register the provider to have it by default for all zf based projects?

A: 

In your bootstrap you can add a script path:

protected function _initViewScripts()
{
    $this->bootstrap('view');
    $view = $this->getComponent('view');

    $view->addScriptPath('path/to/view/scripts/');
}
smack0007
Does Zend_Tool use Bootstrap? (I have already modified the paths in application resource and I'm asking how to tell the same to Zend_Tool)
takeshin
Sorry, didn't see the part about using it with Zend_Tool.
smack0007
A: 

I cannot tell you how you can achieve what you want but I can point you to some great help. Zendcast If you don't know about zendcast its a great palce to look for tutorials about the zend framework.

Iznogood
+1  A: 

Look at the default Zend Providers and extend the classes with your own, overloading the paths.

Adrian