-
### Problem
When using Twig in your own apps, you have full control over your dependencies, so all filters/functions are defined. However, when using Twig for third-party packages (e.g. Symfony bun…
-
How is it possible to check which browser is used in Twig?
It is written that it is possible in php code but I couldn't find a proper Twig filter for it:
```
$mobileDetector->isChrome();
$mobile…
diriy updated
4 years ago
-
Similar to the order option I want to filter a collection based on the page header. For example `header.premium: true`. Maybe it would make sense to add a comlete twig condition there that gets evalua…
-
This is related to https://github.com/kalamuna/twig-drupal-filters/issues/6
I think this might be easier done in kss-node when the extend-drupal8 flag is set than in the twig-drupal-filters package…
-
I guess this isn't really an issue, but I don't know enough about git to make this a pull request or whatever, and I wanted to share this in case others were looking for something like this:
Thanks…
-
Twig is a modern template engine for PHP
Fast: Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum.
Secure…
-
A useful enhancement to the plug-in would be converting individual event times from UTC/GMT (the GOOGLE .ics default) to whatever time zone the Grav site owner config specifies as the default (in our …
-
I've tried to make some changes to the clean template, but struggle to find any documentation on what fields are available. Therefore could a filter be added (say get_items) which would work in the f…
-
### Description
Currently, in order to create a custom twig function/filter, we need create a class that extends the AbstractExtension, that looks like this:
```php
class TwigExtension extends …
-
The Twig filter `number_format` was added in Twig v1.5. Alas, we are stuck with v1.4.
`{{ 3.00 + 0.40 }}` returns 3.4
Is there a way to handle this and not lose the trailing zero?