Add div after every 3d element twig loop, modulus

Twig
Hi so i have this twig loop, and what i need to to is after every 3rd element to add some html to close div row and open new one. I tried with variou...
6 months ago

Symfony: passe parameter to Ajax url

Twig
I am trying to figure out how to enable/disable user with checkbox without page reload. index.html.twig <table> <thead> <tr>...
6 months ago

how does "{% use %}" work in twig using symfony3?

Twig
I'm trying to use the {% use %} syntax to import the blocks from a child template in my base template as described in http://twig.sensiolabs.org/doc/t...
6 months ago

Symfony and Twig, prerender, parse view, replace content

Twig
I need replace some content in every file of view. But content in many places is just a text, not a variable, co i cant use variable|replace() filter....
6 months ago

Pass include path from variable with Twig?

Twig
I need to include child-1.twig and child-2.twig in component.twig, and include component.twig in page.twig. In my page.twig: {% set items = [ '{%...
6 months ago

PHP Twig Error: Object of class __TwigTemplate_XYZ could not be converted to string

Twig
Hey and good morning :). I'll start with the error message and explain afterwards what I've tried and did: Catchable fatal error: Object of class __...
6 months ago

How to use an image style in a Drupal 8 twig template?

Twig
I am trying to print an image using an image style that I've created in my drupal 8 theme. I can print an image in a template by doing {{ content.ban...
6 months ago

Passing Twig variables from array into an include

Twig
I have an array I'm iterating over to pull in different types of components into my page: array( 'content'=> array( 'componentA'=>a...
6 months ago

How to embed double quotes in Twig interpolation?

Twig
I am trying to replace sprintf(' href="%s%s"', ..., ...) from a PHP file into its Twig alternative. I'd like to use Twig's interpolation feature but, ...
6 months ago

How to delete white spaces of a text in twig?

Twig
I'm using the twig template engine while using symfony2. I'm trying to find a way to delete the white spaces from a text. For example, I play shall ...
6 months ago

cannot load Twig template (Symfony 2.8.8)

Twig
So I have the folder structure below: According to the Symfony manual (click here), I should be able to load my Twig template but Symfony cannot fi...
6 months ago

Get length of array with condition on attribute

Twig
I'd like if is it possibel to get length of array with condition on attribute without create another query in the controller. public function pageAct...
6 months ago

Symfony2 - Hyperlink to an exterior url retrieved from database using TWIG

Twig
i'm using symfony 2.0.19, and i'm trying to create a hyperlink to an external URL, this URL is retrieved from database, i tried doing this <td>...
6 months ago

Change Wordpress Timber Template locations

Twig
I need to overwrite the page template locations for Woocommerce using timber Wordpress. All page Templates are stored in the theme root folder and i ...
6 months ago

Prevent quotes from being converted to HTML entities in twig ternary operator

Twig
The following does not convert the quotes to HTML entities {% for row in files %} <tr data-id="{{ row.id }}"><td>{{ row.name }}</td&...
6 months ago

Multidimensional Array in Twig

Twig
I am using Twig with PHP. I have a multidimensional array setup like this: Array ( [Special] => Array ( [277] => Array ...
6 months ago

symfony2: how to check if form is new?

Twig
I want to check if a form is new in my template, something like $form->isNew() in symfony 1.4, but i did not find a solution. Currently, i'm using th...
6 months ago

Print second level menu in Drupal 8

Twig
Drupal 8 markup changed quite a lot from Drupal 7 using the Twig Engine. We are developing a site with it. We want to print the second level menu link...
6 months ago

Twig: How to round up?

Twig
I have a division in twig. Sometimes, the result can be with decimals and i need to have always a rounded up result. Ex. 7 / 2 = 3.5 I would like...
6 months ago

Extending stylesheet block

Twig
I have stylesheet block in base layout: {% stylesheets filter='cssrewrite' 'bundles/static/css/main.css' %} <link rel="styleshe...
6 months ago