Jump to content

[SOLVED] Top menu URL changes in product page and CMS pages


Recommended Posts

I have used the built in module top horizontal menu in my theme  in order to add and remove items from the store menu. The menu contains links to both CMS and product pages. All the links work correctly in the homepage of the site. However when I click on a product and go to its respective product page, the links to CMS pages changes to,

 

CATEGORY_NAME/CMS_PAGE

 

Similarly when I click on a CMS page on the homepage and then choose to go to a product page the links change to,

 

content/CATEGORY_NAME

 

I hope its clear

 

I have tried searching through the DB tables and associated tpl and php files but couldnt find the cause of this problem. Please help me to determine the cause of this issue

Link to comment
Share on other sites

Yes thanks for checking it out. The links seem to be working correctly for the CMS pages, however the Contact Us page is still affected

It goes as,

domainName/Category/contact-us

Amazingly however the inspect element displays the correct URL, but when you hover over the contact us menu item it displays as I showed above

1399550_10200403462882997_2114387615_o.j

Link to comment
Share on other sites

Hello Yoosuf,

 

 

Either you have added contact link statically in .tpl or you have given wrong link.

If you have put it statically then remove it and add it from module as following:

 

login as admin -> modules -> find and configure blocktopmenu module.

Now create a link for contact-us page and give it link as index.php?controller=contact .

Now add this menu to navigation and save.

 

Now check it will definitely work fine.

Link to comment
Share on other sites

Vekia - No I didnt edit any tpl files for including the contact us page. It is the same form which is shown at default

 

I did make a link to the contact us page from the BlockTopHorizontalMenu as [email protected] suggested by creating a new menu item link as, "contact-us"

After replacing it to "index.php?controller=contact ". the problem is resolved and the contact us page is shown correctly on all product and cms pages. However, the URL is still the same for product pages, the only difference is it goes by

 

DOMAIN NAME/CATEGORY/index.php?controller/contact

 

The link still works now and it redirects to contact us. But would it be possible to use the friendly URL option because all other pages have it

Link to comment
Share on other sites

Ok, I included the full URL as you suggested and it works correctly on all pages now.

This was the way in the beginning but at that time it would duplicate the URL as,

 

http://domain.com/contact-ushttp://domain.com/contact-us

 

Thats why I changed it earlier

 

Anyhow Thanks a lot Vekia and Mukesh

You may mark it as solved

Edited by Yoosuf (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...