On Sat, Jun 28, 2008 at 9:45 AM, Gustavo Carreno <[EMAIL PROTECTED]> wrote:
> What I was expecting was each time I'm calling an
> "example.com/admin/*" route is that the scope would be on the
> modules/admin/views/script files.
> Or at least there first and then fallback to
> modules/default/views/scripts files.

Ok, I had a lill more time to investigate this and it seams it's
related to the ViewRenderer.
If I:
<?php
        /** Add the custom view object to the ViewRenderer */
        $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
        $viewRenderer->setView($view);
        Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
?>
OR
<?php
        //$viewRenderer =
Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        //$viewRenderer->setView($view);
?>
Now, calling a module::admin route:
The first layout to be called is the one from module::default.
If that layout does not exist on module::default but does in
module::admin I get an error missing the layout.phtml
Partials first resolve to module::default and then module::admin

I've resolved this matter by completley having the MVC magic get the
view and dealing with it. Meaning that any f the above code is
commented out.
This, however, does not permit me to addScriptPath() to the view. What
ever partial path I add it always looks for partials under
":module/views/scripts"

I don't mind it working like this, but it's rather strange that
manually messing with the ViewRenderer in any way, paths get dropped
or not considered.
Never the less I would like to find the solution to have partials
under ":module/views/scripts/partials" and them being found by the
$view->partial();

> On a related subject:
> Is it possible to have the URL View Helper return a url containing the
> module in it but not having it mentioned in the config.ini?
> Clarifying:
> - confg.ini:
>  * routes.listusers.route = "users/list" ; Not "admin/users/list"
>  * routes.listusers.defaults.module = "admin"
> - under view, $this->url(array(), "listusers") returns:
> http://example.com/admin/users/list, not http://example.com/users/list

Sorry, had no time to investigate this one yet.

-- 
Gustavo Carreno
--- http://batxman.wordpress.com
< If you know Red Hat you know Red Hat,
If you know Slackware you know Linux >

Reply via email to