Welcome Guest, Not a member yet? Register   Sign In
Hello, I'm new
#1

[eluser]Sandro87[/eluser]
Hello,
I'm new to codeigniter and php frameworks in general.
I have a very good PHP base to start with.
I saw several tutorials and along with the documentation learning and coding seems pretty easy for meSmile

What I need to understand or at least have a GENERAL idea is how to organize large website that has a lot sections, categories etc.. how can I best organize them?

Plus I understand that I can easily create HTML templates by merging templates and loading them together, but let's say that my page has 3 columns (DIVS) and except for the main centered one the others on the side will stay the same and change dynamically only in some pages (controllers).
I still don't get how I can achieve that without sending to the views the same "sides" contents in every controller and then change them once I need it to.


Thanks
#2

[eluser]nzmike[/eluser]
There's a couple ways you could do it.

The best way I have found is using template inheritance. This is similar to the way Django does it. Arashaw has made a library which is basically the Django inheritance for PHP. I've just written a blog post on it, check it out.
#3

[eluser]InsiteFX[/eluser]
Use a MY_Controller it's in the users guide.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB