how to use header and footer in codeigniter |
[eluser]physicfor[/eluser]
i have site with a dynamic header with diffrent categories which changed from page to page i need to include the header in every page i create header.php in the view folder but every time i have to pass the category array to the header view in every page i read the manual and i search this forum there is a similar post with no answer please if any one can help and here is the very similar post http://ellislab.com/forums/viewthread/96974/P0/
[eluser]kkith[/eluser]
I'm not sure what your question is. Hm, the first response by Rey Philip Regis in your link with the similar post has a great example. Are you asking if there is a way for CI to create a view that automatically includes the category? If so, then no CI doesn't do that. Nor does any other framework I know of.
[eluser]physicfor[/eluser]
so i think the beast way is to create parent controler with header and footer methods then extend this controler in other controlers am i wright !!!!!
[eluser]vitoco[/eluser]
i think this may help you to get a different perspective http://ellislab.com/forums/viewthread/156134/ ...maybe a wiki and a working example will help Saludos
[eluser]physicfor[/eluser]
[quote author="vitoco" date="1275362597"]i think this may help you to get a different perspective http://ellislab.com/forums/viewthread/156134/ ...maybe a wiki and a working example will help Saludos[/quote] thank you and for pepole who will read this post i solve my problem with the following first i extend the controler class by go to libarry in the aplication folder and create MY_Controller.php this file contain Code: class Application extends Controller then in other controler in my aplication i use Code: class Test extends Application {
[eluser]Piter[/eluser]
Hi, I use is Layouts: application/librares/layout.php Code: <?php Code: $this->load->library('layout'); Code: $this->layout->view('myfile', $data); Layouts page Code: <html> |
Welcome Guest, Not a member yet? Register Sign In |