How to <br> in menu ?

General questions about CMSimple
bastingse
Posts: 243
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

How to <br> in menu ?

Postby bastingse » Fri Feb 26, 2016 7:16 pm

Folks, i wonder if this is possible to make.

If i use a menu, lets say "toxic_xh", as horizontal menu. Is it possible to use a <br> in the menu?
If i use this in the page:
<h1>Menubutton/<br>in two lines/<br>or even three</h1>
Then this is showing exactly as i ment it should on the page, but in the meu (tc, toxic) it is only one line.

Can this be done somehow?????

Hope you understand what i mean :-)

Thanks already!
Emile

cmb
Posts: 12051
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: How to <br> in menu ?

Postby cmb » Sat Feb 27, 2016 10:02 am

bastingse wrote:Is it possible to use a <br> in the menu?

The labels of the menu items are given by the $h array, which contains the page headings without any HTML tags. To allow <br> elements in the menu, you would have to modify the $h array, which might have some unwanted side-effects. Anyway, you can try it out by modifying a single line in cmsimple/functions.php:

Code: Select all

        $temp_h[] = trim(xh_rmws(strip_tags($temp[2], '<br>')));
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

bastingse
Posts: 243
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

Re: How to <br> in menu ?

Postby bastingse » Sun Feb 28, 2016 8:06 am

cmb wrote: which might have some unwanted side-effects.


Whow !!! This works !!!!
Perfect, just what i needed !! So much appreciate this !!
What can be the unwanted side-effects??

cmb
Posts: 12051
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: How to <br> in menu ?

Postby cmb » Sun Feb 28, 2016 9:42 am

bastingse wrote:Whow !!! This works !!!!

Great!

bastingse wrote:What can be the unwanted side-effects??

Well, $h (i.e. the page heading) is used for other purposes, too, so there might be cases where the <br> causes trouble or is at least unwanted. That might particularly the case with some plugins using $h. However, if it works for you, it's fine.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

bastingse
Posts: 243
Joined: Fri Jun 06, 2008 9:38 pm
Location: Netherlands
Contact:

Re: How to <br> in menu ?

Postby bastingse » Sun Feb 28, 2016 9:50 am

Image

sophiamaria

Re: How to <br> in menu ?

Postby sophiamaria » Fri Aug 12, 2016 2:47 am

Useful replies! Thank you. I don't understand this, neither..=))

Tata
Posts: 2531
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: How to <br> in menu ?

Postby Tata » Fri Aug 12, 2016 4:53 am

sophiamaria wrote:Useful replies! Thank you. I don't understand this, neither..=))

If you use plugins on the page, test if all of them work properly.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest