Magento Redirect Category link to CMS page, CMS page in Top menu by URL rewrite management

Sometime I have to add article content page and external url in Magento’s top navigation menu. This can be done without using any third-party extension. I have my own menu extension ready for any projects but when menu is not complex and all themes styling are ready for default navigation I use default Navigation.

Magneto have a built-in way to Add any URL in to Magento’s default catalog category top navigation.

Here is how it works:

There is some features in admin panel’s Catalog -> URL rewrite management to work with urls generated by magento when we are adding products, category etc.ย  I use this to point a category url to cms-page or any.

Lets say I want to add “Home” and “Contact Us” in top menu.
And “Home” is a CMS page which have url /home and “Contact Us” is the default contact form in /contacts

Step 1:
Create Category “Home” and “Contact” (Yes, Category)
from admin Catalog -> ‘Manage Categories’ and keep note of both category ids
make sure thus categories are visible in front-end top menu.

Step 2:
Go to admin Catalog-> ‘URL Rewrite Management’. Find entries for thus categories.
to do that look for entries here with ID Path category/55 and category/56 (put your category ids here, my id for contact category is 55 and 56)
And click on entries and set Redirect to Permanent

Step 3:
Go to Catalog-> ‘URL Rewrite Management’
for “Contact Us” menu item
Click ‘Add URL Rewrite’
Select “Create URL Rewrite:” drop-down to “Custom”
Then enter “ID Path”: category/55 or anything without space (this may be not available in Magento EE),
Enter category url in “Request Path”: catalog/category/view/id/55 (put your category id instead of 55),
Enter the url where you want to redirect in “Target Path”: contacts
Select “Redirect”: permanent
then click “Save”.

Now Add another URL rewrite
for the “Home” menu item
Click ‘Add URL Rewrite’
Select “Create URL Rewrite:” to “Custom”
ID Path: category/56 or anything without space (this is just an identifier)
Request Path: catalog/category/view/id/55
Target Path: home (or any CMS page url)
Redirect: permanent
then Save

To change order of thus two menu items, you can always category tree

That’s it.
let me know if it works for you ๐Ÿ˜›


Posted

in

by

Comments

8 responses to “Magento Redirect Category link to CMS page, CMS page in Top menu by URL rewrite management”

  1. lrkwz Avatar
    lrkwz

    Did you try if this resists to reindexing?

    1. M. Ashraful Abedien Avatar

      It works. No prob with indexing

  2. lrkwz Avatar
    lrkwz

    Did you try if this resists to reindexing?

    1. M. Ashraful Abedien Avatar

      It works. No prob with indexing

  3. kakashihatake Avatar
    kakashihatake

    It actually works. There’s no resistance in reindexing.

  4. kakashihatake Avatar
    kakashihatake

    It actually works. There’s no resistance in reindexing.

  5. Muhammad Saeed Khan Avatar
    Muhammad Saeed Khan

    What about making the category name active? In current scenario, the category is not marked as selected in top Navigation Menu as it for other simple categories.

    Thanks

  6. Muhammad Saeed Khan Avatar
    Muhammad Saeed Khan

    What about making the category name active? In current scenario, the category is not marked as selected in top Navigation Menu as it for other simple categories.

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *