CodeIgniter Forums
Twig template for CI4 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: Twig template for CI4 (/showthread.php?tid=66519)

Pages: 1 2


Twig template for CI4 - xprezesx - 10-31-2016

Hello.
I think that CodeIgniter 4 should have integrate TWIG TEMPLATE.

I am using this integration for CI3
https://github.com/kenjis/codeigniter-ss-twig


RE: Twig template for CI4 - jlp - 10-31-2016

This issue/suggestion has been extensively discussed already in this forum.
You want Twig, X insists that Smarty is the only way to go, Y swears by Blade, etc.
There is no single templating engine that would satisfy everyone Undecided
None of these will be part of CI4, but it will be easy for developers to integrate them.


RE: Twig template for CI4 - xprezesx - 11-15-2016

(10-31-2016, 08:13 AM)jlp Wrote: This issue/suggestion has been extensively discussed already in this forum.
You want Twig, X insists that Smarty is the only way to go, Y swears by Blade, etc.
There is no single templating engine that would satisfy everyone Undecided
None of these will be part of CI4, but it will be easy for developers to integrate them.

Them you should create composer modules for easy integration Smile

Thanks for recipe.


RE: Twig template for CI4 - sv3tli0 - 11-16-2016

(11-15-2016, 11:10 AM)xprezesx Wrote: Them you should create composer modules for easy integration Smile

Thanks for recipe.

You know that such "you should", "you must" and etc are usually paid tasks.

It's more than enough that they are making the framework


RE: Twig template for CI4 - jasonzig - 02-19-2019

(10-31-2016, 03:37 AM)xprezesx Wrote: Hello.
I think that CodeIgniter 4 should have integrate TWIG TEMPLATE.

I am using this integration for CI3
https://github.com/kenjis/codeigniter-ss-twig

Take a look at the Twig Library implementation at https://github.com/deathart/BlogCI4/blob/master/application/Libraries/Twig/Twig.php.

Maybe it will provide the help you're looking for in using Twig with CodeIgniter 4.


RE: Twig template for CI4 - purpleprawn - 02-20-2019

Also technically PHP is a templating language so there's no real need for Twig, Smarty etc


RE: Twig template for CI4 - kilishan - 02-20-2019

The Parser already includes many of the features of Twig. Additionally, basic template support (extending layouts, content sections, etc) were introduced to the framework last week. But, you could also create a thin wrapper around Twig and use it in place of the renderer service and incorporate it fairly easily.


RE: Twig template for CI4 - gondwe - 02-22-2019

I have never liked templating engines.. They slow you down.


RE: Twig template for CI4 - kilishan - 02-22-2019

(02-22-2019, 09:41 AM)gondwe Wrote: I have never liked templating engines.. They slow you down.

I agree in many ways, though not always. I probably personally won't use the Parser much - but the ability to extend layouts and the like makes things so much simpler to organize, I feel.


RE: Twig template for CI4 - Onyx - 03-15-2019

template engines ends up to be another language/format/structure to learn that you just end up referencing again
*smarty is still alive...