Hallo everyone,
My first message here on the forum.
I used to have my own framework made with PEAR libraries some several years ago, but since then PHP has come a long way, so the framework become quite outdated.
Since then I’ve started to look for a replacement framework, one which will be able to form cute URL’s, be small and be fast. That’s why I believe I’ve chosen CI. But… before I make my first project I decided to read everything I could find on the subject, including the book “CI for rapid PHP app. devel.”. And then I realized that I don’t have code reuse in my apps, something that standard PHP, PEAR and Savant2/3 used to give me. The ability to define a - I call them - modules (menu, pool box, banners, simple search form), which I will be able to include anywhere in the application and they would work out of the box.
The style I’m used to work is the following:
- one view template for header
- many view templates for the main section (reports, registration forms go here, it’s the central part of the page)
- one view template for the footer section
Header then includes the “modules” I’ve mentioned before, such as menu and maybe a search box, while the footer includes “modules” such as banners section or some similar.
Of course the “main” section is where the main content should be presented to the visitor - texts, pictures, registration forms, etc.
So I’ve decided to do the forum search. From what I can see, this topic is exactly what I need (please correct me if I’m wrong). But… I don’t find my self able to understand the code logic here.
I would politely ask you to well, give me some clues, a mini tutorial sort of and tell me and probably other people that wonder - how this code can be used? Where should it be placed, how should the code structure be divided. I believe that one simple example with one “included module/library/view” would be just about enough.
And please don’t mind my ignorance in MVC, since I do come from modular style of PHP programming.
Thanks a lot.
Gjoko Pargo.