About Template Engine Twig

This module adds the Twig template engine to the TemplateEngineFactory

Category 1Development Tools
Modules that have more to do with assisting development of a site rather than managing its content.
Category 2Markup Generation
Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin).
Category 3Other Modules
Modules that have a unique purpose not covered by existing categories.
Release StateStable
Should be safe for use in production environments. *
Authorwanze
Module Version1.0.4
Class NameTemplateEngineTwig
Compatibility2.3, 2.4, 2.5, 2.6, 2.7, 3.0
Date AddedJuly 3, 2014
Last UpdatedFebruary 27, 2017
Recommended ByNew recommendations may take up to 1 day to appear.

Instructions

This module's files should be placed in /site/modules/TemplateEngineTwig/
How to install or uninstall modules

README

TemplateEngineTwig

ProcessWire module adding Twig templates to the TemplateEngineFactory

Installation

Install the module just like any other ProcessWire module. Check out the following guide: http://modules.processwire.com/install-uninstall/

This module requires TemplateEngineFactory: https://github.com/wanze/TemplateEngineFactory

After installing, don't forget to enable Twig as engine in the TemplateEngineFactory module's settings.

Configuration

  • Path to templates Path to folder where you want to store your Twig template files.
  • Template files suffix The suffix of the template files, default is html.
  • Import ProcessWire API variables in Twig template If checked, any API variable is accessible inside the Twig templates, for example {{ page }} refers to the current page.
  • Auto reload templates (recompile) If enabled, templates are recompiled whenever the source code changes.
  • Auto escape variables If enabled, templates will auto-escape variables. If you use ProcessWire's textformatter to escape variables, do not enable this feature.

Comments

No comments yet. Be the first to post!

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.