advanced modules

edited September 2011 in Modules
i am new to fuel. inspired too much by it. i have tried the advanced module section. the problem is that i do not find the left section populated with my new module. as in the tutorial, it is blog, lets call it abc for my case. i have followed whatever is given in the tutorial for advance modules. what to do?

Comments

  • edited 12:06AM
    Add the module folder name to your modules_allowed parameter in the fuel/application/config/MY_fuel.php and see if that fixes your issue. If you already have that, be sure to include a $nav array variable with your menu items in your modules config file (similar to the blog).
  • edited September 2011
    much grateful to you. it solved my problem. now i have the following item in $nav array
    ''dispatches/index' => 'dispatches',

    it is appearing as desired in the right menu. now, when i click upon it, the url becomes
    http://localhost/ims/index.php/fuel/dispatches/index

    i have a controller in the dispatches module folder controller named dispatches and it has a method named index. but i get 404 error.
    now where am i missing?
  • edited 12:06AM
    Try removing the index from the link. If you want to keep it, make sure there is a route in place to handle it in your fuel/modules/{module_name}/config/{module_name}_routes.php file
  • edited September 2011
    index.php appears automatically, i tried to remove the index,at the end,with abc method and set the route as
    $route[FUEL_ROUTE.'dispatches/abc'] = DISPATCHES_FOLDER.'/controllers/dispatches/abc';
    the url is now , when clicked on side of admin,
    http://localhost/ims/index.php/fuel/dispatches/abc

    error remains
  • ????
  • edited 12:06AM
    Are you able to browse to the module's controller at http://localhost/ims/index.php/displatches with the "fuel" part?
  • edited September 2011
    yes!
    it is directly accessible .
    please tell what do you mean by fuel part?
  • edited 12:06AM
    The route should actually be:
    $route[FUEL_ROUTE.'dispatches/abc'] = 'dispatches/abc';
  • edited September 2011
    it worked.... thanks.
    but now it is not loaded in the admin window....
  • edited 12:06AM
    What are you seeing now instead of a 404?
  • i see my dispatches/abc method in a white screen. i expected it to see in the admin .
  • edited 12:06AM
    In order for the method to render in the admin, you will need to call the $this->_render('my_view', $vars);
  • thanks alot, it solved much of my worries. but the problem i face now is that this module is searching the view in the application/views.
    but my custom view is in modules/dispatches/views.
    what should i do now?
  • edited September 2011
    In your dispatches controller class, add the following at the top before the constructor:
    public $view_location = 'dispatches';
  • i am much thankful to you. it solved my problem. hope i go successfully. thanks again.
Sign In or Register to comment.