How to write twig tags inside TinyMCE

Twig
I have an issue with TinyMce combined with Twig, I'am trying to paste html with twig tags into tinyMce. (using raw html) here is what i want as a res...
2 years ago

Printing json in Laravel templates

Twig
I'm having trouble in moving Eloquent data to Laravel templates as JSON. The problematic data is user inputted text which has linebreaks, all kinds of...
2 years ago

How to access parent twig templates attributes property?

Twig
I have field.html.twig: {%- for item in items -%} <div{{ item.attributes }}> {{ item.content }} //Calls field-collection-item--field-banner....
2 years ago

Use bundle error templates in Symfony 3 app

Twig
I have a MyBundle bundle which I use in many Symfony applications. This bundle provides common things which are shared across these applications, such...
2 years ago

How to add variables to custom Twig's TokenParser?

Twig
I want to make custom twig tag, similar to include tag, but take variables from json file. I.e. in twig template I write {% section "header" %}, and i...
2 years ago

How can I set data's in twig from Ajax response

Twig
I can't set data's in twig from Ajax response. ${id} I render content on front-end with jQuery template (use Ajax response), and I can't set data's ...
2 years ago

Symfony VichUploaderBundle Form Theme does not displays element

Twig
On my Symfony 3 project that uses VichUploaderBundle and FosUserBundle I created a form that the user uploads the avatar image: namespace AppUserBund...
2 years ago

How to use CSRF token in Silex 2 via Twig template?

Twig
i've registred a CsrfServiceProvider() $app->register(new Silex\Provider\CsrfServiceProvider()); My form: <form action="{{ url('some.action'...
2 years ago

How to make the 'breadcrumb' variable available in breadcrumb.html.twig available in node--type.html.twig

Twig
There's a variable breadcrumb that is available in breadcrumb.html.twig I have a node type Page on which I need the breadcrumb, because it has to go ...
2 years ago

display a table using for twig

Twig
helo everybody i'm usng symfony and html2pdf bundle to generate a pdf file so here's the code that i used to display a table in the pdf file <ta...
2 years ago

How to remove all after specific character in Twig?

Twig
I'm using twig and Codeigniter and i'm trying to create links for a menu. The link's names looks like this : about_us, home, our_products_and_ac...
2 years ago

Symfony2 - Searching for objects by user input

Twig
I'm trying to search for objects based on words the user types in, but the search results always come up blank. I know the query is right because if I...
2 years ago

Symfony: Redirect to user profile after login with id

Twig
In my application I wish to redirect users to profile after login, so I'm using an hidden input with name _target_path and value /profile/{userid} in ...
2 years ago

Twig can't find function created inside TwigExtension class

Twig
I am trying to call Twig function created in TwigExtension (Symfony 3.3). Problem is that I can't find what I did wrong and I am not sure why it is no...
2 years ago

twig print field multiple image in field templates

Twig
Here, I have attached my code <div{{ attributes }}> {% if not label_hidden %} <div{{ title_attributes.addClass('field-label') }}...
2 years ago

Twig templating for variables and filters

Twig
Having problems with correct output in October CMS twig: Using - <img src="{{ asset('assets/img/flag-'~code~'.png'|theme) }}" class="flag"> A...
2 years ago

How can I show results count on search results page in Drupal 8?

Twig
I'm trying to display search results count in the result page in Drupal 8, I want to display something like: 23 results for search_word. I'm using th...
2 years ago

Difference between use & include in Twig

Twig
What is the difference between use and include in Twig? Documentation: include The include statement includes a template and returns the ren...
2 years ago

Twig function for repeating template

Twig
I'm new to Twig and recently started a project. In this I use a Star Rating Display very often, which needs also some values, e.g the rating to displa...
2 years ago

Console error: image not found

Twig
Some context: I'm using a .twig file to display some .png images, like this <img class="output-icons" src="{{ asset('path/to/images/output_icon_' ...
2 years ago