1

I am trying to add/remove a few links from this line in the header. However, the code is not a block, and so is not available through the backend. Each part is its own block, and though I found the search bar, I have not found the part relating to the links. And help at all would be great.


Image of the line of text referenced

| improve this question | | | | |
1

The above links are in top.links block. You can remove it through the below code.

<referenceBlock name="top.links">
    <referenceBlock name="register-link" remove="true" />           
    <referenceBlock name="authorization-link" remove="true" />      
    <referenceBlock name="wish-list-link" remove="true" />          
    <referenceBlock name="authorization-link-login" remove="true"/>
    <block class="Magento\Framework\View\Element\Html\Link" name="contactus.link" after="register-link">
        <arguments>
                <argument name="label" xsi:type="string" translate="false">Constact Us</argument>
                <argument name="path" xsi:type="string" translate="false">contact-us</argument>
        </arguments>
    </block>
</referenceBlock>

Thanks

| improve this answer | | | | |
  • While this helps, it does not help in adding new items to the block. Could you please explain further on that point? – Max Porteous Jan 14 at 18:23
  • Please check updated answer – Moin Malek Jan 15 at 7:17

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.