Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

text in button of main menu in 2 lines
(1 viewing) (1) Guest
Userguide, Report bugs, New Ideas...
  • Page:
  • 1

TOPIC: text in button of main menu in 2 lines

text in button of main menu in 2 lines 10 years, 9 months ago #12381

  • Romanov
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Hello,

I want to separate text in some buttons in main menu into 2 lines, because text there is too long. It will help me to locate all menu in one line.

Please, can you tell me how or where can I make it. I understand that main menu is in menusys folder, but I can't understand what file responds for displaying text. Is idea to catch space and enter < br / > instead of it is good?

Thanks.
Last Edit: 10 years, 9 months ago by Romanov.

Re: text in button of main menu in 2 lines 10 years, 9 months ago #12382

  • Romanov
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
I found that 313 line in ytmenu.php at the menusys folder:
$menu_title = "<span class=\"menu-title\">" . htmlspecialchars($this->title) . "</span>";
displays the title of the button.
I replaced space to the < br / >, like this:
$menu_title = "<span class=\"menu-title\">" . htmlspecialchars(str_replace(" ", "<br/>", $this->title)) . "</span>";

But as you can see on my site it doesn't helped.

Can anyone suggest any ideas?

Re: text in button of main menu in 2 lines 10 years, 9 months ago #12404

  • Romanov
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
I solved my problem by deleting htmlspecialchars function:
$menu_title = "<span class=\"menu-title\">" . str_replace(" ", "<br/>", $this->title) . "</span>";

What kind of problem can I get from this deleting?

Thanks.
  • Page:
  • 1
Time to create page: 0.20 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes