CodeIgniter Forums
template library for CodeIgniter 2.0 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: template library for CodeIgniter 2.0 (/showthread.php?tid=38359)

Pages: 1 2 3


template library for CodeIgniter 2.0 - El Forum - 02-06-2011

[eluser]duellsy[/eluser]
https://github.com/duellsy/codeigniter-template

I've decided to make my Code Igniter template library public. This library is a complete rewrite of a library that mattems and I wrote a few years ago.

It saves me a hell of a lot of time and has been used on quite a few projects, so has evolved over time to be pretty lean and streamlined, and helps to keep my main controllers code really stripped back.

The readme explains how it's used along with a rundown of the functions available for use, with a quick example for the welcome message that comes with the CI base install being modified to use this library.

As a side note, it also works perfectly with HMVC by wiredesignz > https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc


template library for CodeIgniter 2.0 - El Forum - 02-06-2011

[eluser]Basketcasesoftware[/eluser]
Thanks for the contribution. I'm now looking for a future use for it. Smile


template library for CodeIgniter 2.0 - El Forum - 02-06-2011

[eluser]Vheissu[/eluser]
Awesome! I love it when someone makes a new template library. Phil's seems to get the job done, but there is always room for improvement. I'll see how your library goes integrating into a daily deals website CMS that I am currently building with CI.

Also, just noticed you're from Australia, that's cool. I'm from Brisbane myself, good to see another Codeigniterer from Australia on the forums.


template library for CodeIgniter 2.0 - El Forum - 02-06-2011

[eluser]duellsy[/eluser]
cheers guys.

Like I said, it's not an absolute beast but it's doen what I've needed it to in the recent past, but it's always being updated so I'll be pushing the changes to github as I make them.
Love to hear your suggestions on what you think should also go in there.

Feel free to fork and contribute by the way


template library for CodeIgniter 2.0 - El Forum - 02-06-2011

[eluser]Vheissu[/eluser]
[quote author="duellsy" date="1297052379"]cheers guys.

Like I said, it's not an absolute beast but it's doen what I've needed it to in the recent past, but it's always being updated so I'll be pushing the changes to github as I make them.
Love to hear your suggestions on what you think should also go in there.

Feel free to fork and contribute by the way[/quote]

I love the idea of having functions that let you add CSS and JS, etc. Looks like it'll be pretty useful in my projects, if I make any fixes, I'll be sure to contribute them back and you can integrate them.


template library for CodeIgniter 2.0 - El Forum - 02-06-2011

[eluser]duellsy[/eluser]
[quote author="Vheissu" date="1297053313"]I love the idea of having functions that let you add CSS and JS, etc. Looks like it'll be pretty useful in my projects, if I make any fixes, I'll be sure to contribute them back and you can integrate them.[/quote]

It's got the option of just loading the source normally, or if you want you can have it read in the contents of the file and dump them straight into your template head, so that when it comes time to render to screen the browser doesn't have to load all the css and js files separately.

This is something new, haven't had a chance to test it out on something large scale, but in theory it should cut back some of the lag in loading js and css files

It's a per css/js option, so you can mix and match


template library for CodeIgniter 2.0 - El Forum - 02-09-2011

[eluser]duellsy[/eluser]
FYI the project has been moved to
https://github.com/duellsy/codeigniter-template


template library for CodeIgniter 2.0 - El Forum - 02-09-2011

[eluser]Frank Rocco[/eluser]
Getting error:
Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\ci_admin\application\controllers\welcome.php on line 14

Code:
$data = array('some_variable' => 'some_data')
        
        $this->template->add_message('notice', 'You are using the subooatmpl library');
        
        $this->template->set_content('welcome_message', $data);
        $this->template->build();



template library for CodeIgniter 2.0 - El Forum - 02-09-2011

[eluser]WanWizard[/eluser]
You're missing a semicolon at the end of the first line...


template library for CodeIgniter 2.0 - El Forum - 02-09-2011

[eluser]Frank Rocco[/eluser]
duh, thanks

Now getting

Message: Undefined property: Welcome::$quickauth