Kirby Twig Versions Save

Twig templating support for Kirby CMS 2. For Kirby 3, use https://github.com/amteich/kirby-twig

v3.0.3

5 years ago

Remove most doc files (except the LICENSE) on the Composer branch, so that Composer only downloads what is useful.

v3.0.2

5 years ago
  • #29 Fix loading some templates on Windows

v3.0.1

6 years ago

Fixes:

  • #25 Can't register namespaces, functions & filters in plugins
  • #26 Somehow allow adding safe functions

v3.0.0

7 years ago

New features

  • A new twig() helper function allows rendering a template file or a template string from PHP.
  • Flexible configuration with twig.function.* config keys that allow exposing any number of functions to Twig templates from config, plugins, etc.
  • Improved error handling.
  • Much of the documentation has been rewritten.

BREAKING

  • Namespace and class names (and sometimes methods) have changed; there is now a Kirby\Twig\Plugin class which will act as a stable API, while other implementation details may change.
  • Removed the twig.env.classes option and new() Twig function.
  • Twig’s template cache is now disabled by default (enable with c::set('twig.cache', true);).
  • Error reporting: the twig.error config key is now ignored. Instead, the site’s main error page (whose URI is error by default) will be used in some specific situations. See doc/errors.md for details.

Deprecated (still working)

  • twig.env.functions in favor of twig.function.myFunction;
  • twig.env.filters in favor of twig.filter.myFilter;
  • twig.env.namespace.xyz in favor of twig.namespace.xyz.

Note on branches and tags

  1. develop is now the development branch, with new features and potentially breaking changes.
  2. composer is the stable release that can be installed with Composer; Git tags starting from v3 will all point to this branch.
  3. master is the stable release that can be installed by downloading a zip file or with Kirby’s CLI.

v3.0.0-beta1

7 years ago

If you’re arriving here from the Kirby Cosmos newsletter, note that Kirby Twig 3.0.0 stable was realeased.

Installation instructions: https://github.com/fvsch/kirby-twig#installation

Release notes: https://github.com/fvsch/kirby-twig/releases/tag/v3.0.0

v2.1.2

7 years ago
  • Updated Twig lib to 1.28.2.
  • Added the pattern() helper function (from the Kirby Patterns plugin) to the list of functions available by default.

v2.1.1

7 years ago

v2.1.0

7 years ago
  • Add default Twig namespaces for templates, snippets, assets and plugins folders, and provide config to define other namespaces.
  • The c() function was renamed to c__get()
  • Twig’s PHP cache is now enabled by default

v2.0.2

7 years ago

This re-enables installing with Composer, this time directly from Packagist, but it does not (yet?) replace the Twig library copy with a Composer-installed one.

v2.0.1

7 years ago

Warning: error page was not showing in 2.0.0. Fixed in this release.