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 6130817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:54:09+00:00 2026-05-23T16:54:09+00:00

I am making a simple application and I am familiar with CodeIgniter 1.7.3, which

  • 0

I am making a simple application and I am familiar with CodeIgniter 1.7.3, which I didn’t have any problems putting sub folders into the application/views folder.

My problem is specifically when I try and load the view, I get the standard CI error message of An Error Was Encountered Unable to load the requested file: usercontentpages/testview.php

However if I move the view file out of the sub folder and place it in the application/views folder the load view command works fine?

I can’t find any documentation in the user guide on why this is so?

Here is my Controller:

    <?php
class Pages extends CI_Controller
{

//Controller Constructor
    public function __construct()
    {
        parent::__construct();
    }

    //Home Page (Default)
    public function index()
    {       
         //Loading a Partial View
         $mContent = $this->load->view('home', '', TRUE); //this works
        //$mContent = $this->load->view('subfolder/home', '', TRUE); //this doesn't work

         $data = array(
             'mainContent' => $mContent,
         );
         //Passing the partial view to the master page
         $this->load->view('usermasterpage', $data);
    }
}
?>

Here is my Master Page:

<?php
//Doctype
echo doctype('html');
?>
<html>
<head>
    <meta charset="utf-8">

</head>
<body onload="OnLoad()">
    <div id="wrap">

        <!-- Main Content Div -->
        <div id="mainContent">
        <?php 
            /* Every page will have a main content area */
            if(isset($mainContent))
            {
                echo $mainContent;
            }
        ?>
        </div>
    </div>
</body>

And Finally here is the page snippet I’m trying to load:

<p>Hi there</p>
  • 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-05-23T16:54:09+00:00Added an answer on May 23, 2026 at 4:54 pm

    CodeIgniter will successfully use nested views: I use nested views all the time and I know others who do as well, and it works out of the box. Show some code so we can see what you’re doing wrong.

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

Sidebar

Related Questions

I am making a simple application which requires colored output. How can I make
I'm making a simple Todo application in Cocoa. I have added a class (and
I have a simple application with a UI with a backend connection, from which
I am making a simple application and will require to actually load different views
I making a simple inventory application. In a table i have columns Quantity, Price
I'm making a simple Kakuro application in Java Swing and I have used JButton
I'm making a simple quiz application which has multiple questions. It has no back
I am making a simple email application in Java. I have an Account class.
I have a simple web application in which I have created a wizard, each
I'm making a simple application. I have a button, that hides the application, and

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.