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

  • Home
  • SEARCH
  • 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 9176521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:07:34+00:00 2026-06-17T17:07:34+00:00

I am using codeigniter for my application and developing with HMVC approach with the

  • 0

I am using codeigniter for my application and developing with HMVC approach with the added package here:

https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc

I have a custom template I created for my views and in my content view have the following lines:

if ((!isset($page_view)) || (is_null($page_view)) || (!file_exists(APPPATH . 'views/backend/' .     $this->cms_template . '/cpanel/pages/' . $page_view . '.php')))
{
    $this->load->view('backend/' . $this->cms_template . '/cpanel/template/page_unknown_view');
}
else
{
    $this->load->view('backend/' . $this->cms_template . '/cpanel/pages/' . $page_view);
}

?>

This works when there are views in the folder but since some of my views will be in a different folder for this HMVC approach it always shows up as my unknown page file. How should I modify so that it works with this approach.

EDIT: Let me try and rephrase all of this. This is my file system…

/application/views/backend/{templatename}/cpanel/index_view
/application/views/backend/{templatename}/cpanel/template/(header.php, footer.php, content.php)
/application/modules/users/controllers/users
/application/modules/users/views/users_view

Lets say the users controller loads the cpanel view as its main view page which loads the three template pages. Being the header, footer and content page. Inside of the content page it performs the if statement as seen above. It gets sent a variable that finds out which controller specific view to load. IN this instance I want it to load the users_view file. So with my if statement I need it to find out if its a file that exists somewhere in that module’s folder.

Does this help at all?

  • 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-17T17:07:35+00:00Added an answer on June 17, 2026 at 5:07 pm

    If you want to access a different module view you can access it in this way:

    $this->load->view('module_name/view_file_name');
    

    If its needed in all the modules,can also place it in main view i.e. applications view

    and you can simply access them using:

    $this->load->view('view_file_name'); 
    

    From any module.

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

Sidebar

Related Questions

I'm using the HMVC modular separation for my Codeigniter application and trying to figure
I'm developing a PHP application using CodeIgniter as the framework, and PostgreSQL as the
I am developing a web book application using the PHP framework CodeIgniter. Users will
I'm writing web application using codeigniter framework. Here is the structure of document root
I am developing an application using codeigniter. In my application I want to calculate
I am developing web application and using codeIgniter framework. I have one module which
I'm developing web application using CodeIgniter. All this time, I put the custom js
I'm developing an application using CodeIgniter on a MAMP server (for development, live it'll
I am using Codeigniter to develop an application, and have been reading bits about
I'm working on a RESTful application using CodeIgniter and I'm unable to access my

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.