CMS Magento Mastering Development

How to add links to header top in magento 2

How to add links to header top in magento 2.
i have tried to

<?xml version="1.0"?> <!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="header.links"> <block class=vendor\HelloWorld\Block\Link" name="add-new-header-link"> <arguments> <argument name="label" xsi:type="string" translate="true">New Link</argument> <argument name="path" xsi:type="string" translate="true">new-link</argument> </arguments> </block> </referenceBlock> </body>

but that does not seems to work

Leave a Reply

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