2

I have created a catalog_category_view.xml file:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="breadcrumbs" remove="true"/>
        <referenceBlock name="page.main.title" remove="true"/>
    </body>
</page>

and placed it in

app/design/frontend/Company/theme/Magento_Catalog/layout/catalog_category_view.xml

or

app/design/frontend/Company/theme/Magento_Theme/layout/catalog_category_view.xml

In both cases, the layout file has no effect on category page. BUT Placing the same code in app/design/frontend/Company/theme/Magento_Theme/layout/dafault.xml works ok.

Any ideas? Am I missing something here?

  • did you check after clear cache ? – Aasim Goriya Dec 19 '18 at 10:57
  • yes, I have tried clearing cache – zekia Dec 19 '18 at 12:07
2

Review the proper structure for theming:

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/theme-structure.html

Review Theme Inheritence:

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/theme-inherit.html

Once you have established that the directory structure is correct -- meaning, you have turned Codazon/Company/theme into only two directories, such as Codazon/theme, then you should check that theme inheritance is handled correctly.

  • That was my mistake in questiuon description. Sorry about that. I changed question text. The correct path is app/design/frontend/Company/theme/ – zekia Dec 21 '18 at 11:29
2

Place it in :

app/design/frontend/Codazon/company/Magento_Catalog/layout/catalog_category_view.xml

without /theme

Update:

app/design/frontend/Company/theme/Magento_Catalog/layout/catalog_category_view.xml
  • That was my mistake in questiuon description. Sorry about that. I changed question text. The correct path is app/design/frontend/Company/theme/ – zekia Dec 21 '18 at 11:29
  • You can see my update. – PЯINCƏ Dec 21 '18 at 11:32
  • thank you. I have already placed the file in app/design/frontend/Company/theme/Magento_Catalog/layout/catalog_category_view.xml but it's not working. I have mentioned this path in my question. – zekia Dec 21 '18 at 13:27
1

The solution to this, is adding a default.xml file, inside directory app/design/frontend/Company/theme/Magento_Catalog/layout/. It overrides all possible layouts.

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.