CodeIgniter Forums
How to deal with templates in CodeIgniter? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: How to deal with templates in CodeIgniter? (/showthread.php?tid=23644)



How to deal with templates in CodeIgniter? - El Forum - 10-18-2009

[eluser]Sinclair[/eluser]
Hi,

I'am now in the process of construction of the template for the website. There are examples on how to correctly build an template in CodeIgniter?

Best Regards,


How to deal with templates in CodeIgniter? - El Forum - 10-18-2009

[eluser]überfuzz[/eluser]
The correct way would be the way you feel must comfortable with. How do you wanna do it?


How to deal with templates in CodeIgniter? - El Forum - 10-18-2009

[eluser]Sinclair[/eluser]
Hi,

I need to do an Header and a Footer to be use in every single page, what is the best way to to this?

Best Regards,


How to deal with templates in CodeIgniter? - El Forum - 10-18-2009

[eluser]überfuzz[/eluser]
Make a template and load the dynamic content in it.

<?php $this->load->view($content); ?>

Pass $content, the path(view) to the dynamic part, from the present controller.


How to deal with templates in CodeIgniter? - El Forum - 10-18-2009

[eluser]Sinclair[/eluser]
Hi,

Thanks for your reply.

There is any example I can see about this technique?

Best Regards,


How to deal with templates in CodeIgniter? - El Forum - 10-18-2009

[eluser]The Wizard[/eluser]
hello, ive developed a master theme system.

for every function you load you have a master template (view)
it works like following:

master.php

load header (chose from the right header you want)
load content view
load footer (again chose)


whit this you can load every header or footer you like with different content.


How to deal with templates in CodeIgniter? - El Forum - 10-18-2009

[eluser]Colin Williams[/eluser]
http://codeigniter.com/wiki/Header_and_footer_and_menu_on_every_page/