Welcome Guest, Not a member yet? Register   Sign In
Problems with Codeigniter HMVC subfolders
#11

[eluser]wiredesignz[/eluser]
Try this in application/config/routes.php
Code:
$route['staff(.*)'] = 'welcome/staff$1';
#12

[eluser]Timothy_[/eluser]
hello,

I just tried this and I am still getting a redirect loop, however this time even on the module controllers.

If anyone else has any other ideas I would greatly appreciate it. I guess my fallback plan will have to be to add all my modules to the application/config/routes.php file. Not ideal as I will have to manually update this file every time I add or remove a module. OK if it was only one ci instance but i have about 50 to regularly update.

Thanks anyway.
Tim
#13

[eluser]InsiteFX[/eluser]
Maybe it would be a good idea to post your code so that we can see whats going on!

InsiteFX
#14

[eluser]Timothy_[/eluser]
What exactly would you like to see?

There is really nothing special about my setup...
#15

[eluser]toopay[/eluser]
why you so love to see code? :lol:
#16

[eluser]SPeed_FANat1c[/eluser]
Hi, I am having problem when I want make folders in modules. Actually module in module. I think this should be possible in HMVC.

D:\projektai\xampp\hmvctest\application\modules\welcome\modules\inside\controllers\inside.php

So I am going to url:

http://localhost/hmvctest/index.php/welcome/inside

and get

404 Page Not Found
The page you requested was not found.

It probably searhes the method "insede" in welcome controller. How to force it use the module "inside"?


Edit:

Also I am trying another thing:

Code:
class Welcomee extends MX_Controller {

    /**
     * Index Page for this controller.
     *
     * Maps to the following URL
     *         http://example.com/index.php/welcome
     *    - or -  
     *         http://example.com/index.php/welcome/index
     *    - or -
     * Since this controller is set as the default controller in
     * config/routes.php, it's displayed at http://example.com/
     *
     * So any other public methods not prefixed with an underscore will
     * map to /index.php/welcome/<method_name>
     * @see http://ellislab.com/codeigniter/user-guide/general/urls.html
     */
    public function index()
    {
        $this->load->module('welcome/inside');
        $this->inside->index();
        
        $this->load->module('near');
        $this->near->index(); //this works, it is in same directory as welcome module
        
    }
}

so I get an error:

Fatal error: Call to a member function index() on a non-object in D:\projektai\xampp\hmvctest\application\modules\welcome\controllers\welcomee.php on line 23

(the controler is 'welcomee', I made it such for testings

Edit2:
found what I wanted - it is written here: http://ellislab.com/forums/viewthread/192633/




Theme © iAndrew 2016 - Forum software by © MyBB