Tag Archives: view

$this->load->view()

When you are using codeigniter, you will use function $this->load->view to load your ‘view’. In codeigniter user guide, a view is described as simply a web page, or a page fragment, like a header, footer, sidebar, etc. In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type of hierarchy.

In my last project, some fragment on view is loaded in every page. They are header, footer and sidebar. And the content is dynamic. I don’t want to load views for every page. So i write a function in a library (or you can also extends the controller) to handle loading views for every page.
Continue reading