![]() |
Hard Searching a easy use of Twig in CI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Hard Searching a easy use of Twig in CI (/showthread.php?tid=35113) |
Hard Searching a easy use of Twig in CI - El Forum - 10-19-2010 [eluser]altrano[/eluser] Hello Comunnity. i searched hours on the web about a solution, plugin, libraries or something else. I Worked with symfony on a project earlier its used twig and i love it :-) but i will learn a bit on other Frameworks actually i am strong interessting on CodeIgniter, but i will use Twig in CodIgniter (-: anyone have a solution, example, plugin, lib or what ever for me??? ![]() Thanks Hard Searching a easy use of Twig in CI - El Forum - 10-19-2010 [eluser]wiredesignz[/eluser] This was a plugin I have used with CI and Twig. Installed as plugins/twig_pi.php however with CI 2.0 you may need to load it as a package from the third_party directory or even modify it to become a helper. It is not designed to be instantiated as a CI library. Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Usage: Code: $view = new mxView(); Hard Searching a easy use of Twig in CI - El Forum - 10-20-2010 [eluser]altrano[/eluser] Code: function load($template, $data = array(), $return = FALSE) what is $this->config->item('settings') ?? i can't find this values.. i use CI 2.0 and mxWidget??? dont exist! Hard Searching a easy use of Twig in CI - El Forum - 10-20-2010 [eluser]altrano[/eluser] Oh men this not works i become only a blank page. my class: Code: <?php if (!defined('BASEPATH')) exit ('No direct script access allowed'); My Public_Controller: Code: class Public_Controller extends MY_Controller welcome.php: Code: class Welcome extends Public_Controller what i make wrong?? Hard Searching a easy use of Twig in CI - El Forum - 10-22-2010 [eluser]drumbassrockroll[/eluser] Try this... http://github.com/MaherSaif/codeigniter-twig Hard Searching a easy use of Twig in CI - El Forum - 10-22-2010 [eluser]altrano[/eluser] [quote author="drumbassrockroll" date="1287785557"]Try this... http://github.com/MaherSaif/codeigniter-twig[/quote] ok thanks i will try it tomorow, hope this work... ![]() Hard Searching a easy use of Twig in CI - El Forum - 10-22-2010 [eluser]wiredesignz[/eluser] You need to append the mxView library output to CI's output class. The config settings 'theme' specifies the location for your template files and 'settings' contains default data values to be displayed. Code: $config['settings'] = array( Maybe nothing will work unless you understand how CI works. Hard Searching a easy use of Twig in CI - El Forum - 10-22-2010 [eluser]drumbassrockroll[/eluser] The link to the library I provided is something that I've NOT tested with CI 2.x. The implementation is sound in 1.7x though. 2.0 is not ready for production, if you manage to get a robust 2.0 implementation with twig then please keep this thread updated in order for the community to write a solid library. Hard Searching a easy use of Twig in CI - El Forum - 10-23-2010 [eluser]altrano[/eluser] [quote author="drumbassrockroll" date="1287815644"]The link to the library I provided is something that I've NOT tested with CI 2.x. The implementation is sound in 1.7x though. 2.0 is not ready for production, if you manage to get a robust 2.0 implementation with twig then please keep this thread updated in order for the community to write a solid library.[/quote] Yes this works fine for me in 1.7.2 in 2.0 i have not tested yet, first i make some games with Twig on 1.7.2 and later i will test it in 2.0. I love this ![]() Ok now let's Play ![]() |