Sten Posted September 15, 2018 Share Posted September 15, 2018 Arjen Thank you very much for your answer. I will change my templates structure. Link to comment Share on other sites More sharing options...
Wanze Posted February 13, 2019 Author Share Posted February 13, 2019 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 4 Link to comment Share on other sites More sharing options...
Noel Boss Posted August 22, 2019 Share Posted August 22, 2019 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 More sharing options...
aagd Posted April 25, 2020 Share Posted April 25, 2020 Hi, I'm trying to figure out if there is better a way to get a file basename without extension in Twig. In PHP I can use: $page->image->basename($ext = false) The only way I got it working in Twig seems a bit ugly: {{ page.image.basename | replace({("." ~ page.image.ext):""}) }} Link to comment Share on other sites More sharing options...
Sten Posted May 15, 2020 Share Posted May 15, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now