Welcome Guest, Not a member yet? Register   Sign In
cleanest way to implement the main layout
#7

[eluser]Josh Bright[/eluser]
I've never really used _remap before, lets say I had your MY_Controller as my base controller, how would I open a page in a controller that I extend from this one? Lets say I have a basic controller as shown below, what would I be changing to take advantage of this?
Code:
<?php
class Home extends CI_Controller {
     public function index() {
          //List of news items that home/index_view will show
          $data['news_list'] = $this->db->getSomeNews();  

          //A view
          $data['content'] = "home/index_view";

          //template/render_view is a view that loads other views, header, footer, along with whats in $data['content']
          $this->load->view("template/render_view", $data);
     }
}


Messages In This Thread
cleanest way to implement the main layout - by El Forum - 04-06-2011, 02:50 PM
cleanest way to implement the main layout - by El Forum - 04-06-2011, 03:47 PM
cleanest way to implement the main layout - by El Forum - 04-06-2011, 05:29 PM
cleanest way to implement the main layout - by El Forum - 04-14-2011, 03:51 PM
cleanest way to implement the main layout - by El Forum - 04-14-2011, 10:35 PM
cleanest way to implement the main layout - by El Forum - 04-14-2011, 11:48 PM
cleanest way to implement the main layout - by El Forum - 04-15-2011, 09:20 AM
cleanest way to implement the main layout - by El Forum - 04-15-2011, 01:15 PM
cleanest way to implement the main layout - by El Forum - 04-15-2011, 05:14 PM
cleanest way to implement the main layout - by El Forum - 04-15-2011, 05:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB