10,622 questions
0
votes
1
answer
28
views
Is it possible to use <ul style="columns: X;"> within the Bootstrap framework?
I am trying to implement this StackOverflow answer but I am running into problems getting Bootstrap to play nice. I am using Bootstrap v4.3.1.
I have the following code that lists brands using a Twig ...
1
vote
1
answer
122
views
Using macros with dynamic name using dot operator does not work
While upgrading twig v1.30 to v3.22.0 i encountered some problem using macros from an external file and calling them by using a variable value as dynamic name.
Given the twig file with the macros:
{# ...
0
votes
0
answers
118
views
Symfony UX Live Components - debounce filter on `data-model` with `data-action` attribute
I have a menu that is using Live Components that shows, loads more, and filters through a list of brands. It shows a list of brands with checkbox for each, that acts as a filtering option on the page. ...
2
votes
1
answer
121
views
Show several markers on a map with Symfony UX Map
I would like to have multiple markers on the same map with Symfony and UX Map!
I've read the documentation but can't find the solution there!
At the moment, I can get all the markers but on different ...
0
votes
0
answers
242
views
How to refresh a Live component manually?
I'm working with Symfony Live Components and noticed an issue when switching between child components.
My parent template looks like this:
{% if step == 1 %}
<twig:ChildComponent1 />
{% ...
1
vote
1
answer
100
views
Trying to format a DateTime results in a "Unknown "format_datetime"" error
I have a new Symfony 6.4 web application, pretty barebone.
I'm trying to format a date using the Twig format_datetime filter:
{{ post.createdAt ? post.createdAt|format_datetime('c') : '' }}
When ...
1
vote
1
answer
148
views
How can I add one "subform" for each day within a range
I'm currently developing a small CRM for a hotel, and I'm hitting a problem with dynamic forms. On the RoomBooking form, the user is invited to select a start date and an end date for the booking. At ...
2
votes
1
answer
75
views
Overwriting block layout_search_suggest_result_price from search-suggest.html.twig in Shopware has no effect
I am trying to remove the price block layout_search_suggest_result_price from the autosuggest search in Shopware v6.6.10.5.
The FroshDevelopmentHelper shows it as
BLOCK BEGIN ...
1
vote
1
answer
90
views
Flash doesn't show up on app_default
I try to use an app_flash on my symfony app, it work everywhere but when I try to display a flash on my app_default it doesn't work. I tried to dump but it's empty like nothing is send.
I have a ...
0
votes
3
answers
177
views
Is it possible to add classes to the body tag?
Is it possible to add classes to the <body> tag in Twig?
I'm using a theme based on Twig for WordPress https://github.com/flyntwp/flynt
I realize that many standard classes are added to the <...
0
votes
1
answer
84
views
Symfony CollectionType form theme
I have collections that i want to render from a form theme,
i succeeded to do that with twig macros, but i prefer, if possible, to do forms themes.
But what i do doesn't work, and i don't really ...
0
votes
1
answer
185
views
How best to import scripts on a specific page after global variable declaration with Symfony Asset Mapper? [closed]
I tried the solution for this question, and while it works great if I want my script on every page: How to import jQuery as a global variable with Symfony's AssetMapper?
However, I have dozens of ...
-1
votes
1
answer
96
views
Check for Content Type in paragraph.html template
I have 2 content types created in Drupal 10 using Structure > Content Types > Add Content Type:
Universal Page => universal_page
Home Page => home_page
How do I check for content type ...
3
votes
2
answers
436
views
LiveComponent isn't updating the LiveProp value
I am trying to use the Symfony UX LiveComponent, firstly I tried to use the first exemple of the documentation:
// ArticleSearch.php
<?php
namespace App\Twig\Components;
use App\Repository\...
1
vote
0
answers
48
views
Getting error "Cannot redeclare class __TwigTemplate"
Im trying to write twig loader that would load templates depending on the city and the partner who announced me in the app. And im getting error when i run my php app. Сlass is loaded correctly into ...