Ext Help Please

Jamie Whittingham

Active Member
Im trying to teach myself how to code basic Ext's for MW

I've adapted one I found elsewhere here on the site but ran into an issue.

If someone could please take a look and see what I screwed up and help me out that would be a great help.

I have been able to get the menu item to show and its loads ext_fbapp/index but then I get the following error

Error 404!
Unable to resolve the request "ext_fbapp/settings/index".


Im sure its something simple but I cannot seem to figure it out to display my views/index.php or views/settings/index.php that should just render a placeholder bit of text i have.

Thanks in advance.
 

Attachments

  • fbapp.zip
    11.3 KB · Views: 4

twisted1919

Administrator
Staff member
In
PHP:
Yii::app()->urlManager->addRules(array(
            array('ext_fbapp_settings/index', 'pattern'    => 'extensions/fbapp/settings'),
            array('ext_fbapp_settings/<action>', 'pattern' => 'extensions/fbapp/settings/*'),
        ));
ext_fbapp_settings is the controller name, while index is the index action inside the controller.
the => denotes that this controller/action will respond to the following url: extensions/fbapp/settings
So accessing /extensions/fbapp/settings will load the ext_fbapp_settings controller and the index action.

However, the controller has to be registered...

I advise to take a closer look at the example extension which describes all this in very detail:
https://kb.mailwizz.com/articles/example-extension-development/

Thanks.
 
Top