[SOLVED] Breaking long menu entries into two lines

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

[SOLVED] Breaking long menu entries into two lines

Post 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
Last edited by nils73 on Thu Mar 03, 2011 10:21 am, edited 1 time in total.
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Breaking long menu entries into two lines

Post 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
markS
Forum Members
Forum Members
Posts: 58
Joined: Wed Aug 20, 2008 3:04 pm

Re: Breaking long menu entries into two lines

Post 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.
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: Breaking long menu entries into two lines

Post 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
Post Reply

Return to “CMSMS Core”