Author Topic: Undo menubreak in breadcrumb  (Read 4028 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

Offline Ruud

  • Posts: 3663
  • 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) {
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();
$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);"