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 »
  • breadcrumb help
  • Print
Pages: [1]   Go Down

Author Topic: breadcrumb help  (Read 7686 times)

Offline bgg

  • Posts: 103
breadcrumb help
« on: October 05, 2007, 03:36:14 PM »
This is the default Breadcrumbs (all):

show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<span class="[class]"> > [a][menu_title]</a>', '</span>', '', '', '<b>You are here:</b> <span class="[class]">[a][menu_title]</a>');
You are here: Home

But when we browse a page other then homepage and iyts sub pages, the HOME button with link to homepage goes off.

how can I always have the HOME link in the breadcrumb?

Logged

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
Re: breadcrumb help
« Reply #1 on: October 06, 2007, 07:57:33 AM »
that lies within the "limitations" ... since all root level pages have the same root status, they will be shown first. You would need to manually make this happen. Some construct like:

Code: [Select]
<?php
if (ROOT_PARENT <= 1) {
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<span class="[class]"> > [a][menu_title]</a>&#39;, &#39;</span>&#39;, &#39;&#39;, &#39;&#39;, &#39;<b>You are here:</b> <span class="[class]">[a][menu_title]</a>&#39;);
} else {
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<span class="[class]"> > [a][menu_title]</a>&#39;, &#39;</span>&#39;, &#39;&#39;, &#39;&#39;, &#39;<b>You are here:</b><span class="[class]"><a href="http://localhost/wb">HOMEPAGE</a> > </span> <span class="[class]">[a][menu_title]</a>&#39;);
}
?>


ATTN: untested, no warranty that it will work.

cheers

Klaus
Logged

Offline bgg

  • Posts: 103
Re: breadcrumb help
« Reply #2 on: September 09, 2008, 03:08:37 PM »
My Homepage ID is 4 !

I have two menus: Menu is# 1, and Menu ID#4.

How do I display 'Home >' displayed in case of all the pages belongs to the 2 menus?
Code: [Select]
<?php
if (ROOT_PARENT == 4) {
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<span class="[class]"> > [a][menu_title]</a>&#39;, &#39;</span>&#39;, &#39;&#39;, &#39;&#39;, &#39;<b>You are here:</b> <span class="[class]">[a][menu_title]</a>&#39;);
} else if {
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<span class="[class]"> > [a][menu_title]</a>&#39;, &#39;</span>&#39;, &#39;&#39;, &#39;&#39;, &#39;<b>You are here:</b> <span class="[class]"><a href="/">Home</a> ></span>  <span class="[class]">[a][menu_title]</a>&#39;);
} else {
show_menu2(4, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<span class="[class]"> > [a][menu_title]</a>&#39;, &#39;</span>&#39;, &#39;&#39;, &#39;&#39;, &#39;<b>You are here:</b> <span class="[class]"><a href="/">Home</a> ></span>  <span class="[class]">[a][menu_title]</a>&#39;);
}

?>

Thanks!
Logged

Offline bgg

  • Posts: 103
Re: breadcrumb help
« Reply #3 on: September 09, 2008, 03:23:55 PM »
Sorry, I forgot to mention:

My 'home'-page is under a hidden menu, meaning it does not come with the Menu(1).
Logged

Offline bgg

  • Posts: 103
SOLVED
« Reply #4 on: September 10, 2008, 10:33:13 AM »
correct  code or breadcrumb with HOME is below :)

Code: [Select]
<?php

if (PAGE_ID == 4) {
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<span class="[class]"> > [a][menu_title]</a>&#39;, &#39;</span>&#39;, &#39;&#39;, &#39;&#39;, &#39;<b>You are here:</b> <span class="[class]">[a][menu_title]</a>&#39;);
}
 

else {
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, &#39;<span class="[class]"> > [a][menu_title]</a>&#39;, &#39;</span>&#39;, &#39;&#39;, &#39;&#39;, &#39;<b>You are here:</b> <span class="[class]"><a href="/">Home</a> ></span>  <span class="[class]">[a][menu_title]</a>&#39;);
}  

?>
Logged

LonelyWolf

  • Guest
Re: breadcrumb help
« Reply #5 on: June 27, 2011, 11:51:49 AM »
Just my 2 cents, a little better for home link:

[original code posted by bgg, over this post]

Code: [Select]
if (PAGE_ID == 4) {
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<span class="[class]"> > [a][menu_title]</a>', '</span>', '', '', '<b>You are here:</b> <span class="[class]">[a][menu_title]</a>');
}
 

else {
show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<span class="[class]"> > [a][menu_title]</a>', '</span>', '', '', '<b>You are here:</b> <span class="[class]"><a href="'.WB_URL.'">Home</a> ></span>  <span class="[class]">[a][menu_title]</a>');
} 
Logged

deekodesk

  • Guest
Re: breadcrumb help
« Reply #6 on: June 27, 2011, 01:49:46 PM »
My developer has done it as i wanted but i have a query..do we need to have rewrite Rule on in .htaccess files...and what other feilds we can include in URLs like date, Keywords, Author name, product name etc...
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • breadcrumb help
 

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