CI beginner question |
[eluser]Avril[/eluser]
Hello, When creating a site with several pages it's simpler to create for example a header and a footer file and then include them into the other pages. This way you don't need to code every change on every page and we all win time. But I've tried this with CI and it seems not to work for me, I'm referring to this thread that I've started load problem? . So basically, I have a header.php (where I create my top navigation links) and I include it in for example index.php, the data seems not to load. But if I load the navigation data in the homepage.php (controller where he pulls the blog posts from my db) then it works. I'm not sure what I'm doing wrong here? Hope that I was clear enough, I can write bizar english sometimes
[eluser]Bas Vermeulen[/eluser]
Hi Avril, I load a template view from all my controllers and pass a main_view variable to it: Code: $data['main_view'] = 'login_form'; The template view looks like: Code: // Load header You could also use Phil's template library: click
|
Welcome Guest, Not a member yet? Register Sign In |