Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Shopware 6 override pagination.html.twig not working

I’m trying to override the pagination.html.twig template in my Shopware 6 storefront but it’s not working.

My pagination.html.twig is:

{% sw_extends '@Storefront/storefront/component/pagination.html.twig' %}
{% block component_pagination %}    
    {{ parent() }}
    {{ dump('test') }}
{% endblock %}

This doesn’t change the show the result of dump at all. What am I missing here? Any help is appreciated!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

First of all, you need to check that your APP_ENV should be set to dev in .env file. Then you must clear the cache every time you add or change the template.

Clear the cache like:

bin/console cache:clear

Kindly, let me know if it works.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading