From cd8ab3e44211a0127c809d6bd9cc30f265d1378e Mon Sep 17 00:00:00 2001 From: robertsaternus Date: Wed, 31 Jul 2024 12:18:50 +0200 Subject: [PATCH] FFWEB-3130: SSR for category pages --- src/Resources/views/storefront/base.html.twig | 2 +- .../storefront/block/cms-block-listing.html.twig | 12 ++++++++++-- .../components/factfinder/paging.html.twig | 2 +- src/Subscriber/CategoryPageResponseSubscriber.php | 9 +++++---- src/Utilites/Ssr/Field/CategoryPath.php | 15 +++++++++++++++ 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/Resources/views/storefront/base.html.twig b/src/Resources/views/storefront/base.html.twig index 3225fe80..c91f2ee1 100644 --- a/src/Resources/views/storefront/base.html.twig +++ b/src/Resources/views/storefront/base.html.twig @@ -124,7 +124,7 @@ {% endif %} document.addEventListener('ffCoreReady', ({ factfinder }) => { - {% if page.extensions.factfinder.ssr == 'ssr' %} + {% if page.extensions.factfinder.ssr == 'ssr' and app.request.attributes.get('_route') == 'frontend.factfinder.result' %} const searchResult = {FF_SEARCH_RESULT}; if (searchResult.hasOwnProperty('records')) { diff --git a/src/Resources/views/storefront/block/cms-block-listing.html.twig b/src/Resources/views/storefront/block/cms-block-listing.html.twig index edc790a0..940f96f5 100644 --- a/src/Resources/views/storefront/block/cms-block-listing.html.twig +++ b/src/Resources/views/storefront/block/cms-block-listing.html.twig @@ -2,7 +2,7 @@ {% set columns = 1 %} {% set element = block.slots.getSlot('toolbarFilters') %} - +{# #} diff --git a/src/Resources/views/storefront/components/factfinder/paging.html.twig b/src/Resources/views/storefront/components/factfinder/paging.html.twig index 88db4cef..f64d87c7 100644 --- a/src/Resources/views/storefront/components/factfinder/paging.html.twig +++ b/src/Resources/views/storefront/components/factfinder/paging.html.twig @@ -1,5 +1,5 @@ {% block component_factfinder_paging %} - +