Fix app.request in templates

This commit is contained in:
TheMilek 2026-03-11 10:54:27 +01:00 committed by Grzegorz Sadowski
parent 8b81264118
commit 999f15aedc
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<button class="btn primary"
{{ stimulus_controller('@sylius/admin-bundle/save-positions', {
url: path('sylius_admin_ajax_product_taxons_update_position', {taxonId: app.request.get('taxonId')}),
url: path('sylius_admin_ajax_product_taxons_update_position', {taxonId: app.request.attributes.get('taxonId')}),
csrfToken: sylius_csrf_protection_enabled() ? csrf_token('update-product-taxon-position') : null,
inputSelector: '.sylius-product-taxon-position',
dataKey: 'productTaxons',

View file

@ -1,3 +1,3 @@
<a class="btn btn-primary" href="{{ path('sylius_shop_product_review_create', {'slug': app.request.get('slug')}) }}">
<a class="btn btn-primary" href="{{ path('sylius_shop_product_review_create', {'slug': app.request.attributes.get('slug')}) }}">
{{ 'sylius.ui.add_your_review'|trans }}
</a>

View file

@ -20,7 +20,7 @@
{% hook 'head' with { _prefixes: prefixes } %}
</head>
<body data-route="{{ app.request.get('_route') }}">
<body data-route="{{ app.request.attributes.get('_route') }}">
{% block body %}
<div class="{% apply escape %}{% hook '#body_classes' with { _prefixes: prefixes } %}{% endapply %}">
{% block header %}