2

I have removed some link from left navigation in My account section and its removed successfully but getting space between links after removing the links.

I have used below code to remove unusual link

<referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>

Please refer to below screenshot:

enter image description here

As in attached screenshot there is an space after My Order and account information.

Please let me know what is best way to remove links so space is also removed.

1 Answer 1

2

Try the below code instead of yours:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-delimiter-1" remove="true"/>
        <referenceBlock name="customer-account-navigation-delimiter-2" remove="true"/>
    </body>
</page>

I have added 2 lines which is called delimiter which are added by magento2 itself. You can add/remove those according to your requirement.

2
  • Hello @sukumar ,its working as expected .Now I want to interchange position Account information and My order.I have already used move element but it is not working.Please let me know how to achieve it?
    – akgola
    Commented Dec 6, 2018 at 7:42
  • 1
    This is a different question. You can ask another question. Surely I ll help you. Commented Dec 6, 2018 at 8:02

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.