Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8620737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:39:05+00:00 2026-06-12T06:39:05+00:00

I have hmvc setup and working fine, I have a gallery module. The gallery

  • 0

I have hmvc setup and working fine,

I have a gallery module.

The gallery module breaks down into three controllers and it’s structure is as follows:

/modules/gallery/
/modules/gallery/config/
/modules/gallery/helpers/
/modules/gallery/controllers/
/modules/gallery/controllers/gallery.php
/modules/gallery/controllers/galleries.php
/modules/gallery/controllers/images.php
/modules/gallery/models/
/modules/gallery/models/galleriesmodel.php
/modules/gallery/models/imagesmodel.php
/modules/gallery/views/dashboard.tpl
/modules/gallery/views/galleries/dashboard.tpl
/modules/gallery/views/images/dashboard.tpl

anyway, I have a function inside my images.php controller called list_items

So I want to map the url
http://example.com/gallery/images/list to
http://example.com/gallery/images/list_items

So I thought, sweet as,
I will just add a /modules/gallery/config/routes.php with the route inside it.

But it seems the routes are not being included.

The routes from /application/config/routes.php are included and if I put a die('loaded') in the module routes.php the it does kill the script,

But running

print_r($this->router) from one of the controllers does not show up any of the routes from the module routes.php.

What’s going on here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:39:06+00:00Added an answer on June 12, 2026 at 6:39 am

    As far as I know,

    HMVC only looks for requested controllers inside each module, with different hierarchy models, but route overrides using routes.php within modules are never read.

    Look into MX_Router::locate it never looks for routes.php inside any module.

    Also it does not override CI_Router::_set_routing which looks for routes.php in config folder.

    You will have to override CI_Router::_set_routing and read config/router.php in every available module for your module route overrides to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

FulePHP is a HMVC framework that allows 'modules' to have their own MVC structure.
I have setup a fresh install of codeigniter 2x and modular extensions (https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home) It
I am working with Codeignitor 2.x and I was originally using controllers as modules
I've read about HMVC (Hierarchic Model View Controller) and it's flexible structure. Have a
I've been reading about modules for codeigniter for quite a while and have decided
**Have it working now. I forgot to populate the Array List. How embarrassing. I'm
Have finally got a responsive site working (of a fashion). What I want to
Have posting working wonderfully, and reading the response happily EXCEPT when one of the
I'm using HMVC and calling modules in a view. In some cases however, the
Question: How do I extend a controller of an HMVC module and then call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.