0

where is function to remove all messages (add or error)? I want to remove message one by one, now magento deletes all at once.

0
<referenceContainer name="page.messages" remove="true" />

Add this in app/design/frontend/[your theme]/Magento_Theme/layout/default.xml

| improve this answer | |
0

Try This Code

app/code/VendoreName/ModuleName/view/frontend/layout

default.xml

<?xml version="1.0"?>

<page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <referenceContainer name="page.messages" remove="true" />
        </referenceContainer>
    </body>
</page>
| improve this answer | |

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.