Twig as our template engine

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Twig as our template engine

Post by EXreaction » Fri Jul 05, 2013 4:58 am

The old one was removed, everything is now rendered with Twig.

User avatar
Mess
Registered User
Posts: 197
Joined: Wed Jun 13, 2012 10:14 am

Re: [RFC] Twig as our template engine

Post by Mess » Fri Jul 05, 2013 6:01 am

I'm very exited to see where this will take us, and how phpBB's designers will embrace this. :)

User avatar
Kamahl19
Registered User
Posts: 161
Joined: Thu Dec 27, 2007 10:31 am

Re: [RFC] Twig as our template engine

Post by Kamahl19 » Fri Jul 05, 2013 11:48 am

Great, thats better. So now we can use all features of Twig including blocks, filters etc using Twig syntax, and some of the features using old syntax, right?

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Twig as our template engine

Post by EXreaction » Fri Jul 05, 2013 1:46 pm

Almost all Twig functionality works using our syntax. A few things, such as: {'a string'|upper} don't work, but at least all Twig tags and filters on regular variables should.

User avatar
Kamahl19
Registered User
Posts: 161
Joined: Thu Dec 27, 2007 10:31 am

Re: [RFC] Twig as our template engine

Post by Kamahl19 » Fri Jul 05, 2013 2:58 pm

But Twig syntax is available too, right? Will there be some list in wiki, listing all features in both syntaxes?

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Twig as our template engine

Post by EXreaction » Fri Jul 05, 2013 3:41 pm

Technically, yes, but whether or not we want to allow the use of the Twig syntax is another question. That question will be addressed in another RFC before 3.1.0 is released, but we'll wait on asking that until Twig is actually merged into 3.1.

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: [RFC] Twig as our template engine

Post by Danielx64 » Sat Jul 06, 2013 9:16 am

Q: the thread that explain how to turn a mod into a ext is now useless? (nv news page example)

User avatar
Kamahl19
Registered User
Posts: 161
Joined: Thu Dec 27, 2007 10:31 am

Re: [RFC] Twig as our template engine

Post by Kamahl19 » Sat Jul 06, 2013 9:30 am

No, I dont think so unless you dont want to use new features from Twig... All old syntax should work.

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Twig as our template engine

Post by EXreaction » Sat Jul 06, 2013 4:10 pm

Where is that thread?

Everything functions about the same for extensions, except there were some bugs fixed and previously incorrect behavior corrected.

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Twig as our template engine

Post by VSE » Sat Jul 06, 2013 6:41 pm

*Daniel wrote:Q: the thread that explain how to turn a mod into a ext is now useless? (nv news page example)
No, it is still totally applicable.
https://github.com/nickvergessen/howto- ... phpbb31ext

The new TWIG engine is a transparent change... All template syntax is unchanged, so far as we are concerned. Except that if you know TWIG, you can actually use that in your template files as well as the standard phpbb syntax, if you wish.

What I want to know is, does the new TWIG engine (by the way the amount of work you did on this Nathan is awesome) address the biggest limitation of the template system for extension developers: the inability to in-line edit lines of code in template files?
Has an irascible disposition.

Post Reply