![]() |
remove header and footer for one partcular page in php codeigniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: remove header and footer for one partcular page in php codeigniter (/showthread.php?tid=71634) |
remove header and footer for one partcular page in php codeigniter - kvanaraj - 09-08-2018 I want to remove header and footer for one particular page (landing page from another resource) in php codeigniter. both header and footer display how to solve this? RE: remove header and footer for one partcular page in php codeigniter - Wouter60 - 09-08-2018 I'll tell you how I do that, but there are more possibilities. I have a MY_Controller in the application/core folder. https://www.codeigniter.com/userguide3/general/core_classes.html?highlight=my_controller In this controller I have a method called render_page: PHP Code: protected function render_page($view,$data='',$template='default') In the views folder, I have a subfolder called templates, with this structure: default special In all my controllers, I load the header and footer like this, with the default template: PHP Code: $this->render_page('news',$data); If I want to load a page with the special template: PHP Code: $this->render_page('external_news',$data,'special'); |