Best method of including views within views in CodeIgniter
Asked 07 September, 2021
Viewed 1K times
  • 63
Votes

I'm starting a large codeigniter project and would like to try to create some reusable 'mini' views for snippets of content like loops of data which may be displayed on different pages/controllers.

Is it better to call the views from within the main controller's view? If so, how? Or should I call the 'mini view' from the controller and thus pass the view's code to the main view?

6 Answer