Output array in Twig

Twig
I trying to output array from database to screen. In my entity: /** * @ORM\Column(type="array", nullable=true) */ private $category; In my twig ...
7 months ago

Can't exploit properly an array with twig

Twig
I created an entity that I want to use to save events such as "[this user] accepted / declined the mission". So far I have no problem to save the even...
7 months ago

Accessing the logged-in user in a template

Twig
I'm using FOSuserbundle to get started with User registration https://github.com/FriendsOfSymfony/FOSUserBundle I've got it registering / logging in ...
7 months ago

Generating Table Content with TWIG in for loop

Twig
I've got a table, that content got generated in a twig template. Every column that got generated executes the code below. What I need to do is the f...
7 months ago

Twig include CSS or Java Script

Twig
I am completely new to Twig. I have a Twig project, but I do not manage to configure paths to css and js file in the project. The packages I have ins...
7 months ago

How do you get the current url in Twig?

Twig
Inside a twig template I will check if url is: http://example.com/search?keyword=test {% set pageTitle = query %} query is test else {% set page...
7 months ago

Generate the HTML template equivalent of a twig file?

Twig
I'd like to know if it's possible to have {filename}.html generated for every {filename}.html.twig? I know one solution is to copy and paste the sourc...
7 months ago

Setting a Quiz System

Twig
I'm developing a MCQs based Quiz system where my goal is to assist teacher in adding a new Question and Choices for that question on the same page. Ac...
7 months ago

How to call a twig filter dynamically

Twig
I need to render data with unknown type with filters that specific on each data type: the rendered structures looks like: array( "value" => ...
4 months ago

Use twig variable in string

Twig
For the language selection I want to show the flag of the current active languages. I get the language variable by: app.request.locale Now I want...
4 months ago

Twig function return a template

Twig
Is it possible for a twig function to return a twig template? For example class ToTimeExtension extends \Twig_Extension { public function getF...
4 months ago

Using CakePHP helpers with TwigView plug-in not working

Twig
I've installed TwigView inside my CakePHP application and I'm trying loading the elements header.twig.tpl and footer.twig.tpl inside the default templ...
4 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', ...
4 months ago

How to pass data- value to jquery function

Twig
I have this HTML line with combination of TWIG code: <a href="#" class="aaa" data-redirect="{{ path('rezervace_smazat', {'terminId':rezervaceTabul...
4 months ago

Twig: elegant way to output array elements in a grid of N columns with if condition

Twig
I'm using Timber & Twig to write a Wordpress theme. It is my understanding that the idiomatic way of outputting posts in a grid with N columns is ...
4 months ago

Set Textbox Value in opened Modal using javascript Dynamically

Twig
On button click open Model like this <a href="#edit-venue" class="btn green editButton" data-toggle="modal" data-id="2" data-placement="bottom" ti...
4 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 ...
4 months ago

Hiding unwanted Symfony form fields from twig

Twig
When showing Symfony form in twig, how to hide field that is not in form_widget? {{ form_start(form) }} {{ form_widget(form.field1) }} {{ form_en...
4 months ago

Symfony 3 don't send the form

Twig
I'm creating blog in Symfony 3.1.7 and i have a problem with sending the form. I created comment Entity Class. Then I generated form class by console ...
3 months ago

symfony redirect from page to page every couple of secunds

Twig
I would like to redirect from page index to slide 1 to slide 2 and than to slide 3 every 5 secunds. How can I do that. So far i try this using this do...
4 months ago