twig-filter Questions

2

Solved

I'm trying to create a specific twig filter that can handle 2 parameters. $documentURL = new Twig_SimpleFilter('documentURL', function($DocumentId, $UserId){ $URL = "http://example.example.com/...
Papaya asked 25/2, 2014 at 18:45

4

Solved

I'm trying to display all elements inside an array and separate them with a line break, but I can't get it work. Here is what I tried: {{ user.roles | join('<br/>') }} {{ user.roles | join...
Sepulcher asked 5/5, 2017 at 14:41

1

Solved

I'm currently updating my projects to Symfony 5.1 (where I was previously using Symfony 4.1). When updating I noticed that I can't install the package twig/extensions anymore, which means I can't ...
Silvern asked 4/6, 2020 at 12:7

3

Solved

I have a simple array of floats. And I need to show it as comma separated string. {{ arr|join(', ') }} is bad solution because of excessive insignificant accuracy. {% for val in arr %} {{val|n...
Emlen asked 24/10, 2016 at 17:14
1

© 2022 - 2024 — McMap. All rights reserved.