Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-17-2008, 09:39 AM
Junior Member
 
Join Date: May 2008
Posts: 3
Default Modules / Controllers / Actions

Working on moving a site onto the Zend Framework and I seem to be missing something.

Have the following File / Dir structure
Code:
/application
    /modules
        /registration
            /controllers
                Registration_FormsController.php
                Registration_IndexController.pfp
            /views
                /scripts
                    /forms
                       adult.phtml
                       child.phtml
                    /index
                        index.phtml
        /default
            /controllers
                IndexController.php
            /views
                /scripts
                    /index
                        index.phtml
When I go to:
http://localhost/index/ - loads index.phtml from default module
http://localhost/registration/ - loads index.phtml from registration module
http://localhost/registration/forms loads index.phtml from registration module
http://localhost/registration/forms/child throws an action exception (no child)

The last 2 I am at a loss on why they act that way or what I am missing

Bootstrap sets:
PHP Code:
self::$frontController->addModuleDirectory('../application/modules'); 
Registration_FormsController.php is:
PHP Code:
require_once 'Zend/Controller/Action.php';   
class 
FormsController extends Zend_Controller_Action   
{   
    public function 
childAction()   
    {   

    }  

Have been going through tutorials / forums etc for about 8 hours trying to figure out what if anything I am missing or not understanding and keep hitting a brick with it.

Any help / advice etc is appreciated. Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-17-2008, 10:20 AM
Junior Member
 
Join Date: Mar 2008
Posts: 26
Default

as i remeber you should name your file FormsController.php and class name should be Registration_FormsController :P
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-17-2008, 11:44 AM
Junior Member
 
Join Date: May 2008
Posts: 3
Default

DOH that did it. Works Perfectly now.

Misread an error message or tutorial somewhere to get the Registration_FormsController.php and had tried the Registration_FormsController class to no avail.

Thanks a mil! Once I get all this figured out the first time around the other 20 or so websites I plan to convert over to ZF should go much easier. This first one is deffinately being a bear though.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:56 PM.