2

In magento1 the remove tag was global and once a block was removed it could never be added back in:

<remove name="catalog.compare.sidebar" /> 

Is the same true in magento2?

<referenceBlock name="catalog.compare.sidebar" remove="true" />
2

It isn't a simple yes or no answer unfortunately. From looking at the remove section in the dev docs it sounds like you can easily remove and 'unremove' blocks with remove="true" and remove="false".

Now I say this isn't a simple answer as the functionality doesn't seem to work, or not always as expected anyway. Quite a few people have noted that if a block has been removed in a parent theme, then setting remove="false" does nothing - taken from this Github issue.

So until that issue has been resolved I would say yes it is the same as Magento one, once a block has been removed it cannot be added back.

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.