we used following format under " age" menu in [Current Demo URL][2]

code : [PASTEBIN DEMO][3]

**"shop by age "**is main category and all other are sub category.

but urls are generating like as in the image


click on 0-6 months for 3 or 4 times

please help me to find solution.

thanks in advance


The way the links are generated in this menu is wrong.

The href attribute is using relative path whereas it should use absolute path.

Adding slashes at the beginning of the href attributes will fix it.

Your final code should look like this:

<li><a href="/shop-by-age/0-6-months.html">0-6 Months</a></li>
<li><a href="/shop-by-age/6-months-and-above.html">6 Months and above</a></li>
<li><a href="/shop-by-age/1-year-and-above.html">1 Year and above</a></li>
<li><a href="/shop-by-age/2-years-and-above.html">2 Years and above</a></li>
<li><a href="/shop-by-age/3-years-and-above.html">3 Years and above</a></li>
<li><a href="/shop-by-age/4-years-and-above.html">4 Years and above</a></li>
<li><a href="/shop-by-age/5-years-and-above.html">5 Years and above</a></li>
<li><a href="/shop-by-age/6-years-and-above.html">6 Years and above</a></li>
<li><a href="/shop-by-age/7-years-and-above.html">7 Years and above</a></li>
<li><a href="/shop-by-age/8-years-and-above.html">8 Years and above</a></li>
<li><a href="/shop-by-age/10-years-and-above.html">10 Years and above</a></li> 
  • is it better to give category url path to sub category url or leaving category url is better? which is better in following: <li><a href="/shop-by-age/0-6-months.html">0-6 Months</a></li> or this one : <li><a href="/0-6-months.html">0-6 Months</a></li> – Baby in Magento Mar 4 '15 at 14:00
  • 1
    Definitely the first one as the second one suggests that all subcategories are also defined as top categories which (except if you create them and didn't display them in the menu) is not true in your case. – Raphael at Digital Pianism Mar 4 '15 at 14:04

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.