4

I am working on a Magento 2.1.7 shop.

On my category pages, I need to have the grid view only, without giving the customer the possibility of switching to the list view.

What is the easiest and/or the most appropriate way to do this?

6

You can choose the Catalog view option as grid only or list only. The default is Grid/List. You can change it to List/Grid as well.

To do so:

1) Go to Store -> Configuration -> Catalog -> Storefront

2) Change the List Mode.

| improve this answer | |
2

If needed can be also applied from layout xml

catalog_category_view.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product_list_toolbar">
            <action method="disableExpanded"/>
        </referenceBlock>
    </body>
</page>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.