HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Just wondering: why still using Smarty 2.x?
Hi there,
I am using Smarty 2 in a very different and very old project - and now, with Vanilla Forums 3.3 - I noticed, that it also & still uses this very old version of the Smarty template engine.
So I am wondering, why has Vanilla not yet moved to the much newer Smarty 3.x release? Is it still because of the community "dangers" & (addon/theme-)dependencies of existing Vanilla Forum solutions, as mentioned in the 2017 comment here?
This is just out of curiosity 😊
Cheers
Tagged:
0
Comments
@oliverraduner What happened is that we've stopped using Smarty entirely in new code. It never real caught on anywhere except for in theme master views anyways.
We've been using Twig for a while, although I guess we never really document it well. I'm overhauling our dev docs at the moment though, and the Twig documentation will definitely make it in.
You can see the new WIP docs here.
How to use twig?
Anywhere that you would put a PHP or Smarty view you can just put a
.twig
file instead and it will be picked up. A lot of the usage has been in cloud-only plugins right now, but you can see the category add/edit view is in twig now https://github.com/vanilla/vanilla/blob/master/applications/vanilla/views/vanillasettings/editcategory.twigThe next update will come with twig docs and support for writing theme master views in twig as well!