Creating a template in CodeIgniter |
[eluser]Unknown[/eluser]
Hello, I'm new to CodeIgniter. Something work, but some things don't work. I've created some views: - header - navigation - mainheader - maindata - footer On every page, 'header', 'navigation' and 'footer' are the same. Only mainheader (page title) and maindata (page data) will change. I want to create a template, so i don't need to load all of these views everytime I've created a class with this function Code: Class Main extends Controller { My idea was: load an URL like http://www.website.com/index/aController/aFunction/ and this function pass the controller name (aController) and function name (aFunction) to the variable $viewToLoad, load the views and everything looks fine in the webbrowser. But, this is only working when the controller Main is always called from everywhere. How can i do this? |
Messages In This Thread |
Creating a template in CodeIgniter - by El Forum - 12-21-2007, 05:28 AM
Creating a template in CodeIgniter - by El Forum - 12-21-2007, 06:00 AM
Creating a template in CodeIgniter - by El Forum - 12-21-2007, 09:05 AM
|