I have overriden app/code/Test/Sales/view/frontend/layout/default.xml file

  <referenceBlock name="top.links">
        <block class="Magento\Sales\Block\Order\Link" name="order-list-link" after="wish-list-link"/>

 <move element="top.links" destination="customer"/>

But no effect.

  • Update your Full path here – Magento 2 Nov 9 '17 at 6:24
  • @Magento2 added full path – jassi Nov 9 '17 at 6:26

Add default.xml in app/design/frontend/your-theme-namespace/yourtheme/Magento_Sales/layout with following content

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="top.links">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-orders-link-top" after="my-account-link" >
                    <argument name="path" xsi:type="string">sales/order/history</argument>
                    <argument name="label" xsi:type="string" translate="true">My Orders</argument>

My Orders link will appear as in the image.
enter image description here
I hope this will be helpful.

  • thank u so much – jassi Nov 9 '17 at 7:25
  • Thank you. In my case I didn't make a Magento_Sales, rather, I added your code in my /app/design/frontend/themefolder/themename/Magento_Theme/layout/default.xml – Mohammed Joraid Jun 29 '18 at 4:13
  • Do you know how to specify it's location among other links. Like to have it after My Wish List and before Sign Out. – Mohammed Joraid Jun 29 '18 at 4:20
  • 1
    @MJoraid if you want it after wishlist link then change argument in after attribute to wish-list-link. For more on layout instructions, you can go through devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/… – Anshu Mishra Jun 30 '18 at 7:04
  • Anshu, I truly appreciate your reply. My My Orders shows at the bottom of the list after Sign Out no matter what value I put in after="wish-list-link" or after="my-account-link" even after="-" or before="-". I even tried to move Sign Oud which I assume is authorization-link but it always remains the last one. If I move authorization-link to another container e.g. panel.search it actually gets moved. – Mohammed Joraid Jul 4 '18 at 2:26

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.