How to install / upgrade
Download joomla-twig-v1.5.0.zip an install through Joomla! Extension Manager.
New Features
New array_values filter
Equivalent to PHP's array_values()
function for Twig. This can be useful when you want to avoid an array order being changed.
Usage:
// Imagine that in PHP you have a var like:
$myArray = [
12 => 'one',
15 => 'two'
];
// In twig you can use it like:
{% set myArrayValues = myArray|array_values %}
Control Twig cache independently
Now the Twig - Cache plugin contains a parameter to enable it in a custom way:
- Use global --
: (Default) Will enable cache when joomla cache is enabled.Enabled
: Cache will be enabled even when Joomla! cache is disabled. That way you can improve Twig performance if you have issues enabling joomla global cache.Disabled
: Cache will be disabled even when Joomla! cache is enabled. That way you can keep Joomla! cache enabled while changing twig layouts.