Loading a div in view. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Loading a div in view. (/showthread.php?tid=15697) |
Loading a div in view. - El Forum - 02-12-2009 [eluser]Unknown[/eluser] while loading a view is it possible to load only a small part of a page. Say i have a template page that contains 5 div's and i just want to load a single div(id=xyz). In my controller i like to do something like this public function index() { $this->load->view(<div id=xyz>); } Loading a div in view. - El Forum - 02-12-2009 [eluser]umefarooq[/eluser] hi peace you have to do some thing like this. controller Code: public function index() view Code: <html> its will work fine. you have to pass array of variables to view. check user guide also. Loading a div in view. - El Forum - 02-12-2009 [eluser]Colin Williams[/eluser] Or, fetch a smaller view and send it to the main one Code: $data['part'] = $this->load->view('part', '', TRUE); |