1

I have a module built in magento 2.1.16 which store details of contacts in database and fetches them on list page and details view page. The contacts are of 3 types

  1. Branches (https://roadmaster.com.co/en_sa/contacts)
  2. Dealers (https://roadmaster.com.co/en_sa/dealers)
  3. Authorized Centers (https://roadmaster.com.co/en_sa/servicecenters)

When i clik on more information on any I get url like this one https://roadmaster.com.co/en_sa/dealers/view/index/id/24/ While i want something like https://roadmaster.com.co/en_sa/dealers/al-khaleej

or for this url https://roadmaster.com.co/en_sa/contacts/view/index/id/1/ I want something like https://roadmaster.com.co/en_sa/contacts/rm-jeddah

The contacts are stored in single table and are distinguished by contact_type attribute.

0

Do below steps Go to Url Rewrite from marketing menu

Now add url rewrite

Click on add url rewrite button

Now do as below and save it.

Set User Freindly Url

By this process you will get user freindly url as you want.

Thanks.

  • Thank you but i don't want this to do manually. I want it automatically (based on url-key) like magento has it for products and categories. – Abid Malik May 12 at 7:46

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.