0

In my magento admin area, admin can set a name to be displayed on the contact us page. For example, admin can set "contact-us" as the url-alias and I want to set that as the frontname of my contacts module. How to do that programatically?

-1

You don't necessarily have to do that programmatically, you can do it from the backend.

Magento 1

Go to Catalog > Url Rewrites.

Magento 2

Go to Marketing > URL Rewrites.

Step by step

Click the Add URL Rewrite button.

Choose Custom in the drop down.

ID Path: contact-us

Request Path: contact-us

Target Path: contacts

Finally click the Save button.

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.