Category "twig"

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

I have a delete button which is created here: _delete_form.html.twig <form method="post" action="{{ path('finals_delete', {'id': final.id}) }}" onsubmit="ret

inside a script module, try to import js files with twig asset() (error: myalias.x is not a function)

[ Environment: symfony (PHP), twig files with HTML/JS code, and Managing assets with Webpack ] Files Tree _assets |__js |__file.js |__library |_

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

I need help figuring out what's wrong. I want to install phpmyadmin on a server to import a wordpress DB but when I install it I have a problem with php-twig I

Convert rows to columns using Twig - D8

I have a content type "Awards" that has data structured as below: I want to group this data as below: Want to group them on a "State" basis. So when I click on

Twig auto import macros by environment

Is it possible (and how) to automatically include specific macro files into every twig file by using PHP (not Twig lang). Example: I got the file select2 wh

Symfony Error: "An exception has been thrown during the rendering of a template"

I am trying to include <link href="{{ asset('css/mystyle.css') }}" rel="stylesheet"/> in my twig file and render it. But it gives me Uncaught P

using random function but it's displaying duplicates

I am using the random function in twig and it is randomizing the images I need but it is repeating the logos. How can I make it so that the images are not repea

Symfony/Twig: Stop rendering the rest of a template

I've been searching the internet for this, but I can't find anything regarding this. I'm creating a simple twig template that is going to be used on multiple l

Twig - How to check if variable is a number / integer

How to check if variable is a number, integer or float? I can't find anything about this. Making project in Symfony 3.

Symfony-Twig: insert fontawesome icon in a form_widget

To validate a form I am using a standard: {{ form_widget(form.save, {'attr': {'class': 'btn btn-sm btn-danger'}, 'label': 'Submit form'}) }} I want to insert

How to minify Symfony / Twig generated HTML code to satisfy Google PageSpeed Insight?

When testing my Symfony 2.8 based webpage with Google PageSpeed Insights I am getting warned, that the HTML code is not minified. This is true, while Assetic

How to escape Twig delimiters in a Twig template?

Twig uses the {{ }}, {% %}, {# #} delimiters. But how can I display {{ }} in a Twig template? I'm not talking about HTML escaping. I ask the question as I wan