[eluser]Anraiki[/eluser]
Hey guys,
I am trying to make a included page inherit the functions of a class in the library, however they are not.
What I am trying to achieve is the ability to organize the system of Code Igniter to my liking:
On the root level of my web host is the following:
- Index.php
- /System/
-- /Application/
-- /Ect/
- /Template/
-- /Default/
--- Index.php
--- Header.php
--- Footer.php
I have created /Template/ on the top level for web designer who do not know any high level of php, it is there for them to design.
As for my I attempt, I have made a Class function to include files in that directory. I have also auto loaded this and the url helper.
So my controller would automatically have one line that loads the view file which had only one line:
<?php $this->template->load('index.php'); //Loads the Default Template Index.php ?>
Now everything is working fine until this point.
In the Default Template index.php:
<?php $this->template->load('header.php'); //Loads the Default Template header.php ?>
~Content~
<?php $this->template->load('footer.php'); //Loads the Default Template footer.php ?>
The page error because the function does not exist (not in that scope), how can I made this included file inherit my class function of template?