Welcome Guest, Not a member yet? Register   Sign In
How to deal with templates in CodeIgniter?
#1

[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,
#2

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

[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,
#4

[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.
#5

[eluser]Sinclair[/eluser]
Hi,

Thanks for your reply.

There is any example I can see about this technique?

Best Regards,
#6

[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.
#7

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




Theme © iAndrew 2016 - Forum software by © MyBB