I'm on developing a new theme. I replaced the cart and the Wishlist Links with icons.

Now I wanted to do the same with My Account. But I'm not able to find the template file. I found this Question: where is default template for link defined?

But the solution is a joke, isn't it?! Do I have to do some wired pointless classes and blocks, just to put in an icon?!

C'mon just tells me where the template file is. It can't be so difficult. Thanks.

Edit: Can I do something like:

<move element="my-account-link" as="<img src='PATH_TO_ICON'>" />

And how would be the Path to the Icon (/app/design/frontend/<vendor>/<theme>/web/images/icons/example.png)?

1 Answer 1


you can override Magento_customer module's default.xml file in layout. In that file there is block called header.link in that block add following code.

<block class="Magento\Customer\Block\Account\Link" name="my-account-link">
     <argument name="label" xsi:type="string" translate="true">My Account</argument>
     <argument name="sortOrder" xsi:type="number">110</argument>
     <argument name="class" xsi:type="string" translate="true">account-link</argument>

This above code will add my-account link to header.links block

<argument name="class" xsi:type="string" translate="true">account-link</argument>

By adding this argument of class to my-account-link block add class to this link

using that class easily css can be applied.

As far now this solution is good rather than finding template file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.