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?
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:
<?php
if (ROOT_PARENT <= 1) {
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="http://localhost/wb">HOMEPAGE</a> > </span> <span class="[class]">[a][menu_title]</a>');
}
?>
ATTN: untested, no warranty that it will work.
cheers
Klaus
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?
<?php
if (ROOT_PARENT == 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 if {
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="/">Home</a> ></span> <span class="[class]">[a][menu_title]</a>');
} else {
show_menu2(4, SM2_ROOT, SM2_CURR, SM2_CRUMB, '<span class="[class]"> > [a][menu_title]</a>', '</span>', '', '', '<b>You are here:</b> <span class="[class]"><a href="/">Home</a> ></span> <span class="[class]">[a][menu_title]</a>');
}
?>
Thanks!
Sorry, I forgot to mention:
My 'home'-page is under a hidden menu, meaning it does not come with the Menu(1).
correct code or breadcrumb with HOME is below :)
<?php
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="/">Home</a> ></span> <span class="[class]">[a][menu_title]</a>');
}
?>
Just my 2 cents, a little better for home link:
[original code posted by bgg, over this post]
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>');
}
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...