Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Line break in top menu
 
geertsamuel
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2013-04-22
 

I need to have line breaks in my top menu, and I can’t do this through CSS.

I tried to edit /core/mage/catalog/block/Navigation.php

but nothing happens. I need it to just allow the “<br />” tag so I can manually insert where I need the line-break.

Tried cleaning caches also but nothing happens.

Hope somebody can help, thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Blanka
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2010-08-01
 

Hi geertsamuel

If you want to have a break on the top menu, please access page/html/topmenu.phml (magento 1.7) or catalog/navigator/top.phtml (magento 1.5,1.6) in the template folder (app/design/frontend/base/default/template/) and insert \"<br/>\" into the place you like.

 
Magento Community Magento Community
Magento Community
Magento Community
 
geertsamuel
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2013-04-22
 

Hi Blanka,
Thank you for your reply, but that\’s not what I\’m looking at.

If you look in the topmenu.pfhtml and top.phtml you see that the Category menu is generated through the variable $_menu.
On of the files refers to getHtml(\’top-level\’) and the other one to a function (inside the file /core/mage/catalog/block/Navigation.php ).

I\’m looking for a way to line break the category name with <br /> in the CMS so it shows up line broken in the menu on top.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top