Reading list Switch to dark mode

    Magento2 – Add New Link in My Account Navigation Panel

    Updated 21 July 2021

    Here will se how to add new link in customer’s account panel in magento2.

    Link in My Account

    Create customer_account.xml in location Namespace/ModuleName/view/frontend/layout

    <?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">https://meet.google.com/ddx-yvpo-wwq
    	<body>
    		<referenceBlock name="customer_account_navigation">
    			<block class="Magento\Framework\View\Element\Html\Link\Current" name="demo-link">
    				<arguments>
    					<argument name="path" xsi:type="string">module/controller/action</argument>
    					<argument name="label" xsi:type="string">Demo Link</argument>
    				</arguments>
    			</block>
    		</referenceBlock>
    	</body>
    </page>

    Result will be look likes the image.
    Link

    Searching for an experienced
    Magento 2 Company ?
    Read More
    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    3 comments

  • Cvince
    Is it possible to give class name to link with this?
  • Mohamed Mekkaoui
  • Callum Glenn Brankin
    How do i add a new page for that link?
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home