My_Template class |
[eluser]walrus_lt[/eluser]
Hello, i'm trying to create my own tpl class wich allow me to load different tpl's views... But my OOP experience is very poor I'm getting errors and don't know what to do. This is my code Code: <?php This class was loaded by ci, from autoload array,.... :/ Could some one help to make this class working? :-S
[eluser]Pascal Kriete[/eluser]
Why are you extending the Loader? I think you need to take a step back and think about what you want to do. Could you tell us how you want it to work (once it's done) - I'm sure someone will have some pointers. Also, have you read about creating libraries?
[eluser]ericsodt[/eluser]
If interested in using my idea.. my 'template' system works like struts tiles (j2ee programming - if not familiar) I have a simple layout file [siteLayout.php] Code: <? Then from my controllers I 'inject' my content Code: $data = array( As you can see I load siteLayout, then inject the contents of home.php into it below the header and above the footer. This is a real simple way to do templating and works well for me. I hope it does the same for you Cheers |
Welcome Guest, Not a member yet? Register Sign In |