2009年6月12日星期五

Re: [fw-mvc] Zend_Controller_Router_Route and script view

Hi,

I created a controller called UserController with an action user/
group.phtml.

I then added your code (approx the same) to my bootstrap. It worked
fine for me.

Can you verify that you have set up your controller correctly, created
the user directory in the view scripts and added a file group.phtml in
it?

I'm assuming you did, but as I can't reproduce the issue I want to
check the basics are setup correctly.

Tnx
Jeroen Keppens
http://blog.keppens.biz


On 12 Jun 2009, at 06:53, blinky68858877 wrote:

>
> Hello,
> Im very new in using ZF. But everything works fine for me without
> Zend_Controller_Router_Route
> in my Bootstrap i call
>
> $router = self::$frontController->getRouter();
>
> $route = new Zend_Controller_Router_Route(
> 'user/group/:group',
> array(
> 'group' => 'member',
> 'controller' => 'user',
> 'action' => 'group'
> ),
> array('group' => '(member|...)') // ... stands for more ;)
> );
>
> $router->addRoute('user_group', $route);
>
> wehn i now create a link with this rout the url created is right.
> But if i
> klick the link, following message appears:
>
> Fatal error: Uncaught exception 'Zend_View_Exception' with message
> 'script
> '.phtml' not found in path
> (D:\xampp\htdocs\zend\application\layouts\;D:\xampp\htdocs\zend
> \application\default\views\scripts\)'
> in
>
> Truly, an empty script file (.phtml) woun't exist. But why trys
> these route
> to changse the script path? If am calling thes controller and action
> without
> a parameter ist works.
> --
> View this message in context: http://www.nabble.com/Zend_Controller_Router_Route-and-script-view-tp23992824p23992824.html
> Sent from the Zend MVC mailing list archive at Nabble.com.
>

没有评论: