Twig Support in the Code Element or a new Twig element

Hi,
I am a new user of Bricks. I never thought I would be a page builder user and fan, but so far the experience has been excellent.

I just have one suggestion, something that I’d really be happy to have, but honestly I don’t think any “typical” page builder has it: support for the Twig template engine.

I use Twig in Meta Box Views and I’m a big fan. I could, theoretically, of course create a shortcode with Twig in Meta Box and then use it inside Bricks. But on some sites I would like to use ACF instead of Meta Box, for various reasons.

Twig is very powerful, it would really supercharge Bricks. Possible use examples: various operations on custom fields values, mathematical, formatting etc. Also creating and outputting variables based on several fields. Surely, you can do the same with PHP, but Twig is just simpler, relatively easy to learn, less verbose and more elegant.

I don’t know if adding support for Twig would be too much to maintain for the Bricks Team. If it is too much, then maybe some Add-on developers (Bricksforge or Bricks Extras) would like to pick up the idea?

Besides Meta Box, also JSON Content Importer Pro has implemented Twig, so maybe it is not very complicated… There is also Timber of course, but I haven’t tried it. At first glance, the implementation in Meta Box looks less complex. It would be super cool to be able to write Twig inside Bricks.

Greetings,
Tom

2 Likes