Page 1 of 1

[SOLVED] Breaking long menu entries into two lines

Posted: Wed Mar 02, 2011 12:04 pm
by nils73
I was wondering if there is any way that I can use ­ on menu text in CMSMS. For example I need to wrap a long word but there is no hyphen inside or a blank so it will only wrap if I use something like ­ as a breaking character.

In earlier CMSMS versions it was possible to use Characters like this as a menu-entry but ever since 1.4 (I guess) it's impossible.

So if there is a smart solution that anybody has come across I would be happy to try it.

Regards
Nils

Re: Breaking long menu entries into two lines

Posted: Wed Mar 02, 2011 12:18 pm
by nils73
Just came up with a solution on my own: Simply add "--" in menu-entries, where you want the entry to wrap and then add to menu-manager following:

{$node->menutext|replace:"--":"­"}

That does the trick. Not very smart though for the client but in the end it works and I am able to explain this trick in a workshop.

Regards,
Nils

Re: Breaking long menu entries into two lines

Posted: Thu Mar 03, 2011 8:42 am
by markS
Hello,

From the menu manager help:

$node->raw_menutext -- Menu Text without having html entities converted

Does that value not do what you want? I've used it before in similar circumstances.


Cheers,
Mark.

Re: Breaking long menu entries into two lines

Posted: Thu Mar 03, 2011 10:21 am
by nils73
Hi Mark,

Code: Select all

$node->raw_menutext -- Menu Text without having html entities converted
This helps a lot. Thanks for pointing it out. I guess I will stick with my solution for now but this one might come in handy in other circumstances.

Regards,
Nils