Skip to content

Commit 2fbc1d9

Browse files
committed
INT-174: Add links to paging component
1 parent 17ec4fd commit 2fbc1d9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Resources/views/storefront/components/factfinder/paging.html.twig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@
1212
</a>
1313
</ff-paging-item>
1414

15+
{% set queryParams = app.request.query.all %}
16+
{% dump(queryParams) %}
1517
{% for p in -1..1 %}
18+
{% set updatedParams = queryParams|filter((value, key) => key != 'page') %}
19+
{% set url = app.request.attributes.get('_route') ? path(app.request.attributes.get('_route'), updatedParams) : app.request.uri %}
20+
1621
<ff-paging-item type="currentLink{% if p %} {{ p }}{% endif %}" class="page-item{% if not p %} active{% endif %}">
17-
<a href="#" class="page-link">{{ '{{page}}' }}</a>
22+
<a href="{{ url ~ "&page={{page}}" }}" class="page-link">{{ '{{page}}' }}</a>
1823
</ff-paging-item>
1924
{% endfor %}
2025

0 commit comments

Comments
 (0)