Welcome Guest, Not a member yet? Register   Sign In
Template Codeigniter
#1

[eluser]Pavellicus[/eluser]
hello,

i'm new about Codeigniter and i'm reading many tutorials in these days but i have some little questions..

now i have my codeigniter and i have a very wonderful template and i want to "merge" these two but i don't how.


if i understand good with CI i need to "destroy" pages of my template and create some Views like "headerA" "bodyB" "footerC" "headerB" "bodyA" "footerC" ecc...

and when (and where) i need i load this little piece in the controllers. is right?


and the second question is : i can put this template in one folder with .js and .css and i call his page and his object from controller or i need to do the process i write up?
#2

[eluser]pickupman[/eluser]
I use a [url="http://getsparks.org/packages/template/versions/HEAD/show"]template library[/url] for generating the views. Yes, you are correct, you need to break your template into parts. On the parts of the template that will be on every page (header/footer + structure), keeps those in a view. Add in the variables for the content blocks/partials that will fill the template.

In your controller you would set the content for the variables in your template, then load the view of your template.




Theme © iAndrew 2016 - Forum software by © MyBB