how to make it little more clean |
the last parameter in $this->load->view() is used to not display the view but return in see this
$data['main_menu'] = $this->load->view('layout/menu', null, true); // here you get the HTML for the menu that is in app/views/layout/menu.php $data['main_content'] = $this->load->view($content_name, null, true); // here you get the HTML for the currently displayed page and this if you don't know <?=$main_content; ?> is <?php echo $main_content; ?> see this and app/views/layout/view.php is the template you can make anything in it also this is an example you can make it in many other ways PS: i'm not really good at explaining |
Messages In This Thread |
how to make it little more clean - by waqaspuri - 04-09-2015, 01:45 AM
RE: how to make it little more clean - by Athov - 04-09-2015, 02:21 AM
RE: how to make it little more clean - by waqaspuri - 04-09-2015, 02:26 AM
RE: how to make it little more clean - by Athov - 04-09-2015, 02:54 AM
RE: how to make it little more clean - by waqaspuri - 04-09-2015, 02:59 AM
RE: how to make it little more clean - by CroNiX - 04-09-2015, 11:15 AM
RE: how to make it little more clean - by waqaspuri - 04-10-2015, 12:43 AM
RE: how to make it little more clean - by waqaspuri - 04-10-2015, 12:44 AM
|