layout file not able to render changes on certain category pages

I have made some changes to the layout using local.xml. With the original sample products and category data that I used to test the site the product listing page works as I want it to. I recently got some more sample product and category data and the changes don't seem to work with these. One example is the top.links. In my local.xml I have

    <remove name="top.links" />
    <remove name="left.reports.product.viewed" />
    <remove name="catalog.leftnav" />
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>

This removes the toplinks for pages containing the original products but not with the new ones. There are no layout updates set in the db for the new products and categories. The templates are also coming from the correct theme. It just looks like my custom layout file is not able to render certain changes.

In addition to the toplinks, the layered navigation is not displaying but I think it is probably the same issue.


There are two types of categories, non-anchor and anchor categories.

Each on of these have a different layout handle. Your code appears to only be using the non-anchor version, if you are dealing with anchor categories you will also need to use the handle catalog_category_layered.

You can check if a category is an anchor category via the category manage section of the admin page.

With regards to the filters not showing that is because you are removing the section that contains the filters.

<remove name="catalog.leftnav" />

If you want to move the block try using unsetChild and insert

Similar questions

magento 2 widget layout update : specified pages section not showing all cms pages
I have created widget that i want to show on sidebar of about us and our company page, but in widget layout update >> specified pages section i can not find any option to see any option of My Cms About us and CMS Company page , Is there any fix to it
Magento 2.1.3: Overriding of vendor layout file with my custom layout file in Magento 2.1.3 is not working?
I have created a custom module in Magento 2.1.3 and its layout file is located in app/code/RP/Testmodule/view/frontend/layout/customer_account_create.xml but the system loads the layout from vendor/magento/module-customer/view/frontend/layout/customer_account_create.xml instead of my custom layout file. How can I override this vendor layout file wi...
For Magento 2 not show some category on frontend for not logged in customer, once customer logged in it will able to see that category on front end
For Magento 2 not logged in customer not able to access selected category any way in store Ex. url, menu, search etc , once customer logged in it will able to see category and its products. can anyone help me how can i do this. i am new in magento 2
Magento2 Stable Release - Render Layout not working in custom module
My module was working perfectly in Magento2 Beta version. In stable version, module is getting listed and custom module backend is working fine. However frontend pages of my module are not working. Here is my code. Index Controller Layout - /app/code/Companyname/Modulename/view/frontend/layout/modulename_index_index.xml Block File When i debug, it ...
Layout type controller does not render scripts
I have a controller which I want to use to load scripts via ajax however whenever I add scripts to the block within the layout page type all script tags seem to be stripped out. Is there a way I can load scripts into this controller like this? Controller xml tagblock.phtml
Is there any easiest way to make changes CSS & JS, and show changes without setup:static-content:deploy & without disabling static content generation?
Can anyone suggest the easiest way to make changes CSS & JS without setup:static-content:deploy every time. And without disabling static content generation.

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.