Hello, Magento Folks,

I am back with another article on Magento development. Last time, We have learned how you can add dynamic row multiselect in Magento 2 system configuration. Today, I am going to explain to you how you can change My Account navigation links title dynamically in Magento2.

Whenever you create my account dashboard navigation link in default Magento, you need to create a customer_account.xml file, and in this file, you need to add title as static. But sometimes you may need to change this title dynamically. And you are not able to do that by hook or cook in the Magento system configuration.

But don’t worry, we have a solution for that, and to make the title link dynamically, you need to have a code that can make the work simple for you. It would help if you had a bit of coding knowledge to achieve this in your Magento 2 store. If you do, then add this following code in your custom extension.

1] First, we need to add customer_account.xml file at the following path,

app\code\Vendor\Extension\view\frontend\layout\customer_account.xml

Now, add the below code to this file.

2] Now you need to create plugin add di.xml file at the following path,

app\code\Vendor\Extension\etc\di.xml

Add the below code to this file.

3] Now, you need to create Changetabtitle.php file at the following path,

app\code\Vendor\Extension\Plugin\Changetabtitle.php

Add the below code to this file.

So, this was it. Simple, isn’t it?

With the help of these codes, you will be able to create dynamic My Account navigation title links. If you had any problem while implementing these codes, then contact us at our support desk. We will be happy to help you.

Lastly, if you like this article, then let us know in the comments section. Also, do share this with your Magento colleagues and friends. If you faced issues or suggestions about code implement we love to hear from you! You may contact our support team here.

Happy Reading?

 

 

Click to rate this post!
[Total: 7 Average: 4.6]