magento2: "update" in category custom layout xml is ignored
I’m trying to add a custom handle through <update handle="my_shiny_handle" /> inside the custom layout xml of a category.
Preconditions
- magento 2.1.0
Steps to reproduce
- add a custom handle in app/code/Myname/Myext/view/frontend/layout/my_shiny_handle.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="catalog.leftnav" remove="true" />
</body>
</page>
- edit a category and set the following layout update xml:
<update handle="my_shiny_handle" /> - cache clean
- load the category in the frontend
Expected result
- the catalog.leftnav should be removed and thus the update handle used
Actual result
- the catalog.leftnav is not removed and thus the update handle not used
the layout xml update for categories itself seems to work - when the action is added directly to the category layout update xml, it works just fine:
<container name="body">
<referenceBlock name="catalog.leftnav" remove="true" />
</container>
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 18 (13 by maintainers)
thanks @sergey-solo!