5

I'm using magento 2 and I'm trying to add the Register , Wishlist, Login links to my tob bar, into header.panel , what's the properly code to add that from xml, or any other way ?

2
  • This is comes inside panel header class at which place you want to display it May 6, 2016 at 12:10
  • I've just did it by adding this in my defaul.xml file <move element="register-link" destination="header.panel" after="minicart.topnav"/> now I'm just trying to find the element for wishlist , how do I find the right element names ?
    – alexcr
    May 6, 2016 at 12:15

1 Answer 1

1

Please use follow code in your file default.xml:

<body>
    <referenceBlock name="header.links">

        <block class="Magento\Framework\View\Element\Html\Link" name="wishlist-link" before="-" ifconfig="guestwishlist/general/addlink">
            <arguments>
                <argument name="label" xsi:type="string" translate="true">My Wishlist</argument>
                <argument name="path" xsi:type="string" translate="false">wishlist</argument>

            </arguments>
        </block>

    </referenceBlock>


</body>

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.