How to modify the home page of the generated website?

The PHP Code Generator (PCG) generates your website in CodeIgniter 3 which is an MVC framework. CodeIgniter uses the following folder structure for MVC.

  • applications
    • models (Called from controller for talking with database for fetching and updating data)
    • views (Called from controller by passing the data for generating the HTML for display)
    • controllers (Called from URL and responsible for generating final outcome using the model and view classes)

The view file responsible for the home page display is at application/views/home.php. So you need to edit this file as you needed for customizing the home page of your website. Also note that the controller method responsible for the home page display is at application/controllers/Home.php. So modify the index method inside the controller if you need addition data to be passed to your modified view file.

Back to academy home