In this tutorial, we are going to discuss that how can we create a custom link for ‘my account’ section in Magento 2 for customer’s dashboard.
The first thing we need to do is to create a layout XML file in our theme. Let’s call it customer_account.xml
Path & file: app/design/frontend/Magemonkeys/magetheme/Magento_Customer/layout/customer_account.xml
Add below code in your layout XML file.
1 2 3 4 5 6 7 8 |
<referenceBlock name="customer_account_navigation"> <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-custom-link" after="-" > <arguments> <argument name="label" xsi:type="string" translate="true">Custom Label</argument> <argument name="path" xsi:type="string">custom-link-path</argument> </arguments> </block> </referenceBlock> |
That’s it. Hope you will able to create a custom link by using the above method.
If you want get query string params in controller file,...
Create di.xml and add the below code Magemonkey/Redirect/etc/frontend/di.xml [crayon-62847132a7e70884337646/] Create...
You can try below code to change local date to...
Step 1: First you need to add registration.php file in...
Step1 : Override message.js in current theme file on the...