1

enter image description here

I want to create new page and link to => HISTORY

how i can do this??

where I can add a new link?

0

You can create customer_account.xml layout XML file with below content to insert a custom link in customer account section.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
      <referenceBlock name="customer_account_navigation">
         <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-mycard">
            <arguments>
               <argument name="path" xsi:type="string">history/index/index</argument>
               <argument name="label" xsi:type="string">History</argument>               
                <argument name="class" xsi:type="string">customer_hostory</argument>
            </arguments>
         </block>
      </referenceBlock>
   </body>
</page>                           

On above XML:

path => URL path that you want to link

label => Text label to show for the custom link

class => CSS class name

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.