breadcrumb help

deekodesk

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...

LonelyWolf

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>');

Test my work here:
[url="http://mysite.altervista.org"]http://mysite.altervista.org[/url]

bgg

correct  code or breadcrumb with HOME is below :)

<?php

if (PAGE_ID == 4) {
show_menu2(0SM2_ROOTSM2_CURRSM2_CRUMB'<span class="[class]"> > [a][menu_title]</a>''</span>''''''<b>You are here:</b> <span class="[class]">[a][menu_title]</a>');
}
 

else {
show_menu2(0SM2_ROOTSM2_CURRSM2_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>');
}  

?>


bgg

Sorry, I forgot to mention:

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

bgg

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(0SM2_ROOTSM2_CURRSM2_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(0SM2_ROOTSM2_CURRSM2_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(4SM2_ROOTSM2_CURRSM2_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!

kweitzel

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(0SM2_ROOTSM2_CURRSM2_CRUMB'<span class="[class]"> > [a][menu_title]</a>''</span>''''''<b>You are here:</b> <span class="[class]">[a][menu_title]</a>');
} else {
show_menu2(0SM2_ROOTSM2_CURRSM2_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

bgg

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?