Hi there,
I am trying to remove a class that is added in a layout xml file. it is added in the wishlist_index_index.xml via:
<block class="Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Actions" name="customer.wishlist.item.inner" template="Magento_Wishlist::item/column/actions.phtml" cacheable="false"> <arguments> <argument name="css_class" xsi:type="string">product-item-inner</argument> </arguments>
</block>
Solved! Go to Solution.
Ok it appears you can just re-add the argument in overwritten xml file and just leave it blank, which achieves what it needs to...
<referenceBlock name="block.name"> <arguments> <argument name="css_class" xsi:type="string"></argument> </arguments> </referenceBlock>
Hi @bwainfindeaafb
Yes, you need to override the xml file in your custom theme.
You can use the following magento document for override the xml file.
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-override.html
I hope it will help you!
Thanks, this is helpful, but trying to work out how to stop displaying this css class?
I understand that in the overwriting xml file I can use
<referenceBlock name="block.name" remove="true"/>
to remove a block, but how to I remove the class? Is it <referenceArgument> or how is it achieved?
Thanks
Ok it appears you can just re-add the argument in overwritten xml file and just leave it blank, which achieves what it needs to...
<referenceBlock name="block.name"> <arguments> <argument name="css_class" xsi:type="string"></argument> </arguments> </referenceBlock>