Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 05:45:55 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: breadcrumb help  (Read 2529 times)
bgg

Offline Offline

Posts: 101



« on: October 05, 2007, 02: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
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6977


WWW
« Reply #1 on: October 06, 2007, 06: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:
<?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
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

bgg

Offline Offline

Posts: 101



« Reply #2 on: September 09, 2008, 02: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:
<?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!
Logged
bgg

Offline Offline

Posts: 101



« Reply #3 on: September 09, 2008, 02: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
bgg

Offline Offline

Posts: 101



« Reply #4 on: September 10, 2008, 09:33:13 AM »

correct  code or breadcrumb with HOME is below Smiley

Code:
<?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>');
}  

?>
Logged
LonelyWolf

Offline Offline

Posts: 33



WWW
« Reply #5 on: June 27, 2011, 10:51:49 AM »

Just my 2 cents, a little better for home link:

[original code posted by bgg, over this post]

Code:
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

Offline Offline

Posts: 9


« Reply #6 on: June 27, 2011, 12: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
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!