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


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Undo menubreak in breadcrumb
  • Print
Pages: [1]   Go Down

Author Topic: Undo menubreak in breadcrumb  (Read 9720 times)

Offline Erwinvb

  • Posts: 11
  • Gender: Male
Undo menubreak in breadcrumb
« on: September 07, 2015, 01:30:53 PM »
I'm using the droplet "menubreak" to breakup the pagetitles in the Megamenu of template "bagslyd".

Works great but ... the breaks also show in de breadcrumb-string of the menu.
Is there anyone with a solution for the problem.

How do I filter the <br>-code from the breadcrumb-string but not from the menu-blocks?

Thanx in advance
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Undo menubreak in breadcrumb
« Reply #1 on: September 07, 2015, 09:45:48 PM »
The droplet "menubreak" a a very simple "replace all || into <br>" on all data in the generated page data.
If you do not want all menu's (like the breadcrumbs) to be replaced you should not use the droplet but work with the generated menu data.

The menu in the template you are using is generated in a variable first. (like $topmenu and $level0menue)
You could do the same "trick" in the template on the generated menu only.
Code: (example) [Select]
$menu = str_replace('||','<br/>', $menu);

If it is "$level0menue" that should be translated the code in the template would become:
Code: (untested) [Select]
$level0menue = '';
if (LEVEL == 0) {
ob_start();
show_menu2(1, SM2_ROOT+1, SM2_START, SM2_ALLINFO, '<li><a href="[url]" class="[class]" style="background-image:url('.$mpics_dir.'/[page_id].jpg);"><span><b>[menu_title]</b><i>[keywords]</i></span></a>', "</li>", '<ul>', '</ul>', true, '<ul>');
$level0menue = ob_get_contents();
ob_end_clean();
$level0menue = str_replace('||','<br/>', $level0menue);
if ($level0menue != '') {$level0menue = '<div class="topbox">'.$level0menue.'<div class="topboxclear"></div></div>';}
}
added the line "$level0menue = str_replace('||','<br/>', $level0menue);"
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Undo menubreak in breadcrumb
 

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