How to access $_POST in Twig form?

Twig
I'm trying to print the value of the input field 'gameTitle' in Twig. This is my code: <h1>New game</h1> <form method="post" action="...
1 year ago

Drupal 8 missing data when changing content

Twig
On drupal 8, I created a template as suggested by debug. My code looks like this: {% for key, element in elements if key|first != '#' %} {# eleme...
1 year ago

How to add class if single tag?

Twig
I have 4 <li></li>, which are showed or not. {% if li == 1 %}{% endif %} How to add class if only one (single) <li></li> is...
1 year ago

Difference between {% include '' %} and {{ include('') }} in Twig

Twig
It's possible to include a file in two different ways: {% include 'fic.html.twig' %} {{ include('fic.html.twig') }} What is the difference betwee...
11 months ago

Translate messages inside twig in symfony2

Twig
I'm trying to access to the translations via twig. For example, I have the name of my application inside my Resources/translations/messages.de.yml an...
11 months ago

Render custom formType option in twig template

Twig
I have this problem in Symfony 2.8: I can't render a custom variable with my query passed to form option. See the below code what i have tried : Thi...
11 months ago

Sending TWIG output to a zip in Symfony for Templating

Twig
I need to create a system that will be able to output a template (a zip with an index.html with all js, css, img etc files as required) based on a set...
11 months ago

Symfony 3 override default form rendering

Twig
Symfony's documentation on "custom form rendering" seems vague and misleading. I am attempting to render a custom element on a form, but I'm seeing in...
11 months ago

How can i split values with twig using filters

Twig
I have a value inside {{ phone }} that i want to split to be formatted as a phone number with twig filters Example; inside {{ phone }} = '20304050', ...
11 months ago

Symfony2 multiple forms in one template

Twig
My app consists of Zones that can have many Devices. When viewing a Zone, it needs to display a control for each Device in the Zone. Each Device is ...
11 months ago

How to use multiple translation files without domains in Twig in Symfony2?

Twig
In the Symfony2 project, I'm working on, the translations are files in multiple domain files like foo.en_GB.xlf bar.en_GB.xlf buz.en_GB.xlf ... foo.d...
11 months ago

Symfony, how to set the member as active or not

Twig
i'm useing symfony in my project and i used this code in twig to show active or disactive button on my members list {% for item in members %} <fo...
11 months ago

How can i get the list of images url's in twig template, Drupal 8?

Twig
I have a content type with image field limited to 10 images. I need to get the list of url's to create a slider in the template. I'm able to access th...
11 months ago

Get base_path in twig file -- Drupal 8

Twig
How can i get the base path of drupal installation in twig file? For example i need to get http://localhost/drupal/. I have tried {{ base_path }} ...
11 months ago

How group item in for TWIG

Twig
How I can grouping item in list, if I have different items with one ID? I want if loop find two or more items with the same id combine them in to lis...
11 months ago

Twig get an option in url

Twig
in a form i would like modify my url when i change my select option. When i do this, i have this in my url : ?extension-filter=&extension-list=10...
10 months ago

Twig Symfony2 get Request variable

Twig
I know I can do this: app.request.get('name') ...but how do I do this? app.request.get(twig_var_name) I've tried every obvious solution {{}} () ...
10 months ago

Angular 2 with PHP backend design structure thoughts

Twig
I have a huge project, which has grown over the years. I would like to change, change not refactor, from jQuery to Angular 2 in the frontend (this is ...
10 months ago

Symfony: How To set Cookies and Session variable in an include Twig Controller?

Twig
This is my first post, then if there is/are any problem let me know :) I'm building a website using Symfony, but I currently got a problem: I can't s...
11 months ago

Twig if statement not including escaped code

Twig
I'm using Twig in Symfony3 and in my view I have an if statement. The html isn't rendered but the escaped twig does get rendered. Here's my code: {%...
10 months ago