WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.

Donate with PayPal buttonSpenden mit dem PayPal-Button

  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • *solved* menu item: manual break?
  • Print
Pages: [1]   Go Down

Author Topic: *solved* menu item: manual break?  (Read 6326 times)

Chaploo

  • Guest
*solved* menu item: manual break?
« on: December 05, 2008, 12:01:28 PM »
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 &nbsp; into menu title doesn't work unfortunately.

Any ideas?

Thanks in advance,
regards
Jochen
« Last Edit: December 11, 2008, 11:00:21 PM by Chaploo »
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: menu item: manual break?
« Reply #1 on: December 05, 2008, 03:25:45 PM »
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
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Chaploo

  • Guest
Re: menu item: manual break?
« Reply #2 on: December 09, 2008, 04:12:07 PM »
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
Logged

Chaploo

  • Guest
Re: menu item: manual break?
« Reply #3 on: December 11, 2008, 11:00:05 PM »
Thanks to BerndJM in the german forum I got a solution: If you use show_menu2 and modify the menu call like this:
Code: [Select]
<?php 
ob_start
();
show_menu2(1, SM2_ROOT, SM2_ROOT, SM2_CURR|SM2_PRETTY);
$menu = ob_get_contents();
ob_end_clean();
$menu = str_replace(&#39;&lt;br /&gt;&#39;, &#39;<br />&#39;, $menu);
echo $menu;
?>
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
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: *solved* menu item: manual break?
« Reply #4 on: December 11, 2008, 11:11:00 PM »
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: [Select]
$menu = str_replace('#', '<br />', $menu);
Ruud
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Chaploo

  • Guest
Re: *solved* menu item: manual break?
« Reply #5 on: December 11, 2008, 11:36:16 PM »
Great idea - and it works! The # simply gets deleted.

From example#and#more as menu title you get exampleandmore.php as filename and the menu shows:

example
and
more

Thanks!!!
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • *solved* menu item: manual break?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2