WebsiteBaker Support (2.8.x) > Templates, Menus & Design
*solved* menu item: manual break?
Chaploo:
Hi everybody,
I was wondering if it's possible to put manual <br /> into menu items any way.
E. g.: If the menu item is
"References Partner Example"
and I want it to be diplayed not the way it happens automatically:
References Partner
Example
but:
References
Partner Example
To put a <br /> or into menu title doesn't work unfortunately.
Any ideas?
Thanks in advance,
regards
Jochen
Ruud:
This is all handled in your stylesheet. (CSS)
This website explains very good how that works. Including examples for horizontal and vertical menu's.
Ruud
Chaploo:
Thanks for your reply.
I think I forgot to mention that I want to change the line break only on one special menu item and was wondering if that works.
regards
Jochen
Chaploo:
Thanks to BerndJM in the german forum I got a solution: If you use show_menu2 and modify the menu call like this:
--- Code: ---<?php
ob_start();
show_menu2(1, SM2_ROOT, SM2_ROOT, SM2_CURR|SM2_PRETTY);
$menu = ob_get_contents();
ob_end_clean();
$menu = str_replace('<br />', '<br />', $menu);
echo $menu;
?>
--- End code ---
you can put as many <br /> in the menu title as you want. Only negative aspect: the filenames will look a little weird then.
Regards
Jochen
Ruud:
Using this, you can use other characters to for replacing with a <br/>.
If you use a #, it will be removed from the filename, but it will be in the menu (not tested!!)
In that case change the replace line to:
--- Code: ---$menu = str_replace('#', '<br />', $menu);
--- End code ---
Ruud
Navigation
[0] Message Index
[#] Next page
Go to full version