Jump to content

Module: Twig for the TemplateEngineFactory


Wanze
 Share

Recommended Posts

Hi folks!

I release a now major version 2.x of the TemplateEngineTwig module. This version is compatible with the newly released 2.x version of the TemplateEngineFactory (more details in this post). Note that the new version of the TemplateEngineFactory might break backwards compatibility, depending on the feature usage. Read the following guide on how to update, before you do so.

So what's new in version 2.0?

  • Updated Twig to 2.6.2
  • Added a setting to enable debug mode, independently from ProcessWire's debug mode.
  • The Twig_Extension_Debug is automatically loaded if debug mode is active.
  • Added unit tests and Travis for CI.

Note that this version no longer bundles Twig. Therefore, installation is only possible with Composer. This makes sure that the 3rd party dependencies are handled correctly.

If you update from 1.x to 2.x, please let me know any issues you have. If you do not update: The 1.x version of the module will stay available on the 1.x branch. For a new project, definitely pick version 2.x!

Cheers

  • Like 4
Link to comment
Share on other sites

  • 6 months later...

Would it be possible to use this module to render a custom string using twig? I am looking for an easy solution to send mails, that the user can edit in the backend and insert variables, for example in the body: “Hello {{ user.fullname }}, thanks for subscribing. {{ unsubscribe }}.” Where user is the user object and unsubscribe a custom variable… Then I would pass this string to twig and send the output… Any idea on how to achieve this? (also might not be with this module…)

Link to comment
Share on other sites

  • 8 months later...
  • 3 weeks later...

Hi,

I change my server with the same debian version, moving my site to it. I have now a Undefined variable: view in     the site.
Thank you. You could save me some  time.

RESOLVED

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...