[DX] Break footer link groups into individual hookable templates

This commit is contained in:
Mateusz 2026-06-11 08:49:46 +02:00
parent f11ff345df
commit 5570ff90fe
19 changed files with 89 additions and 31 deletions

View file

@ -183,6 +183,61 @@ sylius_twig_hooks:
template: '@SyliusShop/shared/layout/base/footer/content/menu/help_links.html.twig'
priority: 0
'sylius_shop.base.footer.content.menu.informational_links':
about:
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links/about.html.twig'
priority: 300
terms_and_conditions:
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links/terms_and_conditions.html.twig'
priority: 200
privacy_policy:
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links/privacy_policy.html.twig'
priority: 100
contact_us:
template: '@SyliusShop/shared/layout/base/footer/content/menu/informational_links/contact_us.html.twig'
priority: 0
'sylius_shop.base.footer.content.menu.help_links':
faq:
template: '@SyliusShop/shared/layout/base/footer/content/menu/help_links/faq.html.twig'
priority: 200
delivery_and_shipping:
template: '@SyliusShop/shared/layout/base/footer/content/menu/help_links/delivery_and_shipping.html.twig'
priority: 100
returns_policy:
template: '@SyliusShop/shared/layout/base/footer/content/menu/help_links/returns_policy.html.twig'
priority: 0
'sylius_shop.base.footer.content.payment_methods':
providers:
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/providers.html.twig'
priority: 100
social_media:
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/social_media.html.twig'
priority: 0
'sylius_shop.base.footer.content.payment_methods.providers':
paypal:
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/providers/paypal.html.twig'
priority: 200
adyen:
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/providers/adyen.html.twig'
priority: 100
mollie:
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/providers/mollie.html.twig'
priority: 0
'sylius_shop.base.footer.content.payment_methods.social_media':
instagram:
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/social_media/instagram.html.twig'
priority: 200
facebook:
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/social_media/facebook.html.twig'
priority: 100
x:
template: '@SyliusShop/shared/layout/base/footer/content/payment_methods/social_media/x.html.twig'
priority: 0
'sylius_shop.base.offcanvas':
cart:
component: 'sylius_shop:cart:widget:offcanvas'

View file

@ -1,7 +1,5 @@
<div class="col-12 col-sm-6">
<nav aria-label="{{ 'sylius.ui.footer_help_links'|trans }}" class="nav flex-column mb-5">
<a class="nav-link" href="#">FAQ</a>
<a class="nav-link" href="#">Delivery & Shipping</a>
<a class="nav-link" href="#">Returns Policy</a>
{% hook 'help_links' %}
</nav>
</div>

View file

@ -0,0 +1 @@
<a class="nav-link" href="#">Delivery & Shipping</a>

View file

@ -0,0 +1 @@
<a class="nav-link" href="#">FAQ</a>

View file

@ -0,0 +1 @@
<a class="nav-link" href="#">Returns Policy</a>

View file

@ -1,8 +1,5 @@
<div class="col-12 col-sm-6">
<nav aria-label="{{ 'sylius.ui.footer_informational_links'|trans }}" class="nav flex-column">
<a class="nav-link" href="#">About</a>
<a class="nav-link" href="#">Terms and Conditions</a>
<a class="nav-link" href="#">Privacy Policy</a>
<a class="nav-link" href="{{ path('sylius_shop_contact_request') }}">Contact us</a>
{% hook 'informational_links' %}
</nav>
</div>

View file

@ -0,0 +1 @@
<a class="nav-link" href="#">About</a>

View file

@ -0,0 +1 @@
<a class="nav-link" href="{{ path('sylius_shop_contact_request') }}">Contact us</a>

View file

@ -0,0 +1 @@
<a class="nav-link" href="#">Privacy Policy</a>

View file

@ -0,0 +1 @@
<a class="nav-link" href="#">Terms and Conditions</a>

View file

@ -1,27 +1,4 @@
<div class="col-12 text-center col-md-6 order-md-4 text-md-start col-lg-3 order-lg-4 text-lg-center">
<div class="mb-3 fw-medium">Payment methods:</div>
<div class="row g-2 mb-4">
<div class="col-4">
<a href="https://sylius.com/partner/paypal/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" src="{{ asset('build/shop/images/paypal-logo.svg', 'shop') }}" width="100%" height="100%" alt="PayPal" />
</a>
</div>
<div class="col-4">
<a href="https://sylius.com/partner/adyen/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" src="{{ asset('build/shop/images/adyen-logo.svg', 'shop') }}" width="100%" height="100%" alt="Adyen" />
</a>
</div>
<div class="col-4">
<a href="https://sylius.com/partner/mollie/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" src="{{ asset('build/shop/images/mollie-logo.svg', 'shop') }}" width="100%" height="100%" alt="Mollie" />
</a>
</div>
</div>
<div class="d-flex justify-content-center justify-content-md-start justify-content-lg-center gap-3 mb-5">
<a class="link-reset" href="https://www.instagram.com/sylius.team/" target="_blank" aria-label="instagram logo">{{ ux_icon('tabler:brand-instagram', { class: 'icon icon-md' }) }}</a>
<a class="link-reset" href="https://www.facebook.com/SyliusEcommerce/" target="_blank" aria-label="facebook logo">{{ ux_icon('tabler:brand-facebook', { class: 'icon icon-md' }) }}</a>
<a class="link-reset" href="https://x.com/Sylius" target="_blank" aria-label="x logo">{{ ux_icon('tabler:brand-x', { class: 'icon icon-md' }) }}</a>
</div>
{% hook 'payment_methods' %}
</div>

View file

@ -0,0 +1,3 @@
<div class="row g-2 mb-4">
{% hook 'providers' %}
</div>

View file

@ -0,0 +1,5 @@
<div class="col-4">
<a href="https://sylius.com/partner/adyen/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" src="{{ asset('build/shop/images/adyen-logo.svg', 'shop') }}" width="100%" height="100%" alt="Adyen" />
</a>
</div>

View file

@ -0,0 +1,5 @@
<div class="col-4">
<a href="https://sylius.com/partner/mollie/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" src="{{ asset('build/shop/images/mollie-logo.svg', 'shop') }}" width="100%" height="100%" alt="Mollie" />
</a>
</div>

View file

@ -0,0 +1,5 @@
<div class="col-4">
<a href="https://sylius.com/partner/paypal/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" src="{{ asset('build/shop/images/paypal-logo.svg', 'shop') }}" width="100%" height="100%" alt="PayPal" />
</a>
</div>

View file

@ -0,0 +1,3 @@
<div class="d-flex justify-content-center justify-content-md-start justify-content-lg-center gap-3 mb-5">
{% hook 'social_media' %}
</div>

View file

@ -0,0 +1 @@
<a class="link-reset" href="https://www.facebook.com/SyliusEcommerce/" target="_blank" aria-label="facebook logo">{{ ux_icon('tabler:brand-facebook', { class: 'icon icon-md' }) }}</a>

View file

@ -0,0 +1 @@
<a class="link-reset" href="https://www.instagram.com/sylius.team/" target="_blank" aria-label="instagram logo">{{ ux_icon('tabler:brand-instagram', { class: 'icon icon-md' }) }}</a>

View file

@ -0,0 +1 @@
<a class="link-reset" href="https://x.com/Sylius" target="_blank" aria-label="x logo">{{ ux_icon('tabler:brand-x', { class: 'icon icon-md' }) }}</a>