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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:03:52+00:00 2026-06-10T18:03:52+00:00

I have taken over a project written in CodeIgniter, which I have never used

  • 0

I have taken over a project written in CodeIgniter, which I have never used before. I have added a new file to views/pages called features.php, and have read on the internet that to make it accessible, I need to create a function in the controller file that will render the page.

I have tried the following:

public function features()
{
    $this->render('template', 'pages/features');
}

However, when I try to open features.php, it gives me 404. How can I fix that?

Update 1 – Class

Here is the controller’s class code:

class Pages extends MY_Controller {

function __construct()
{
    parent::__construct();
    $this->load->model('setting_model', 'setting');
    $this->load->model('order_model', 'order');
    $this->load->model('page_model', 'page');
    $this->load->library('form_validation');
    $this->load->helper(array('inflector', 'string'));
}

public function index()
{
    $settings = $this->setting->get_settings();
    $data['document_price'] = $settings->document_price;
    $this->render('template', 'pages/index', $data); 
}

    //This works fine
public function about_us()
{
    $this->render('template', 'pages/about_us');
}

    //Here is the problem, although it follows the same pattern as about_us()
public function features()
{
    $this->render('template', 'pages/features');
}



}
  • 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-10T18:03:54+00:00Added an answer on June 10, 2026 at 6:03 pm

    As you are using $this->render I guess you are using the template library. I think you should be using:

    public function features()
    {
       $this->template->set_template('template');
       $this->template->write_view('pages/features');    
       $this->template->render();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have taken over an existing project written beautifully in SQL with many useful
I have taken over a medium sized project that was written originally using RoR.
I have taken over a project and am fairly new to cocotouch. I was
So I have taken over a Java Web project . The application was written
I have taken over a project that was build from suggestions in this Dan
I have taken over a project that has a lot of code that is
I have taken over a project where HtmlDecode has been run on all data
I have recently taken over a project in PHP/CakePHP . Now I wanted to
We have taken over a .NET project recently and upon looking at the db
I've taken over the development of a project and have noticed a weird snippet

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.