Skip to content

Commit b3482eb

Browse files
committed
minor symfony#1769 Update ProductGrid.html.twig (seb-jean)
This PR was merged into the 2.x branch. Discussion ---------- Update ProductGrid.html.twig I deleted unnecessary `this`. Commits ------- b631f74 Update ProductGrid.html.twig
2 parents 4868417 + b631f74 commit b3482eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ux.symfony.com/templates/components/ProductGrid.html.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<div class="p-4">
44
<div id="results" style="display: flex; gap: 1rem; flex-direction: column;">
55

6-
{% if this.page > 1 %}
6+
{% if page > 1 %}
77
{# 🦊 #}
88
{# Adding a fake "previous page" div is enough to trick the system #}
99
{# It must have the same ID than the original page #}
10-
<div class="ProductGrid_page" id="page--{{ this.page - 1 }}" data-live-ignore="true"></div>
10+
<div class="ProductGrid_page" id="page--{{ page - 1 }}" data-live-ignore="true"></div>
1111
{% endif %}
1212

1313
{# Current page #}
14-
<div class="ProductGrid_page" id="page--{{ this.page }}" data-live-ignore="true">
14+
<div class="ProductGrid_page" id="page--{{ page }}" data-live-ignore="true">
1515
{% for item in this.items %}
1616
<article class="ProductGrid_item" data-num="{{ item.id }}"
1717
style="--color: {{ item.color }};">
@@ -32,7 +32,7 @@
3232
data-action="live#action"
3333
data-live-action-param="more"
3434
data-scroll-target="loader"
35-
class="btn btn-primary">Load More (page {{ this.page + 1 }})
35+
class="btn btn-primary">Load More (page {{ page + 1 }})
3636
</button>
3737
</div>
3838
{% endif %}

0 commit comments

Comments
 (0)