Actually, I am trying to add signOut link in My Dashboard end of the page where other links are listed programmatically using magento 2.

can any one idea related it.


Add Magento_Customer/layout/customer_account.xml file in your theme folder and paste content below :

    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">

        <referenceBlock name="customer_account_navigation"><!--ifconfig="wishlist/general/active"-->
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-logout-link">
                    <argument name="path" xsi:type="string">customer/account/logout</argument>
                    <argument name="label" xsi:type="string">Logout</argument>
| 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.