Saturday 4 June 2016

How to add a custom link in top link

<referenceBlock name="top.links">
<block class="Magento\Framework\View\Element\Html\Link\Current" name="blog" before="-">
<arguments>
<argument name="label" xsi:type="string">Blog</argument>
<argument name="path" xsi:type="string">blog</argument>
</arguments>
</block>
</referenceBlock>

The result will be like this.

My Account    My Wish List    Create an Account    Sign In    Blog
       
Note: If you want Blog to be 2nd position write before="4".

No comments:

Post a Comment