Zen Cart Logo
Forums / General Questions / Removing breadcrumbs from certain pages...

Removing breadcrumbs from certain pages...

Locked

Views: 3,109

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
27 Sep 2006, 8:41 PM
#1
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Removing breadcrumbs from certain pages...

Now, I remember I was once able to do this, but I've forgotten how (unless ZenCart files have changed)!

I'm trying to remove the breadcrumbs from my privacy policy, terms and conditions and contact us page.

Last time I remember opening up the tpl files and commenting out the breadcrumbs php code. However, I can't find the code anymore! :|

Anyone able to point me in the right directions, please?

27 Sep 2006, 10:52 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Removing breadcrumbs from certain pages...

The call for the breadcrumbs happens in tpl_main_page.php. If your template has separate copies of it for the privacy etc pages, you would find them under the appropriate subfolders.

Alternatively, you can test for $current_page_base == privacy etc, and skip the breadcrumb display if true. See the comments at the top of tpl_main_page.php for more info.

if(!$current_page_base == 'privacy' and !$current_page_base == 'terms etc') {
  //breadcrumb code here will be executed
}  

(the ! means "not".)

27 Sep 2006, 11:22 PM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,638
Plugin Contributions:
0

Re: Removing breadcrumbs from certain pages...

You don't have to code for it- you can use the CSS ...

#PAGE_ID .breadCrumb { display: none;}

28 Sep 2006, 8:04 AM
#4
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Removing breadcrumbs from certain pages...

"Excellent"

Thanks for the replies guys.

I'll probably go down the CSS route, as it's nice and simple.

30 Sep 2006, 3:31 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Removing breadcrumbs from certain pages...

Thanks, Kim, that's way better! Now how come that answer has never been given for this question before, by those who know? Or is this (nearly) the only variant of the question it will work for?

30 Sep 2006, 12:54 PM
#6
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Removing breadcrumbs from certain pages...

Kim:

You don't have to code for it- you can use the CSS ...

#PAGE_ID .breadCrumb { display: none;}

Just tried this and it didn't work. :(

I tested it out on the Advanced Search page by adding the following code to the end of my stylesheet.

#advSearchDefault .breadCrumb { display: none;}

Any ideas?

1 Oct 2006, 7:48 AM
#7
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Removing breadcrumbs from certain pages...

If you mean the navBreadCrumb in the centerColumn of the Advanced Search Page. Sometimes it need to find the exact items in your page after the hints. And #advSearchDefault is under the #navBreadCrumb, and you can't override it.
:smile:

Try the following.

#advancedsearchBody #navBreadCrumb {
	display: none;
}
1 Oct 2006, 8:30 AM
#8
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Removing breadcrumbs from certain pages...

That did the trick! Thanks for the help. :)

1 Oct 2010, 5:08 PM
#9
beep avatar

beep

New Zenner

Join Date:
Nov 2008
Location:
London
Posts:
94
Plugin Contributions:
0

Re: Removing breadcrumbs from certain pages...

Kim:

You don't have to code for it - you can use the CSS ...

#PAGE_ID .breadCrumb { display: none;}

I'd like to use this method to position the breadcrumbs differently on my product info pages (to the left of the image) but can't seem to get the right page id. I've tried..

.productGeneralBody #navBreadCrumb{}
.productGeneral #navBreadCrumb{}
#productGeneralBody #navBreadCrumb{}
#productGeneral #navBreadCrumb{}

evidently I'm not hitting the nail on the head. Does anyone know the correct page id for the product pages, and also perhaps the category pages?

1 Oct 2010, 5:41 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Removing breadcrumbs from certain pages...

You need to look at the page body id for Kim's suggestion. In this case, it's #productinfoBody.

Look in view source, or get Firefox and its Web Developer or Firebug extensions; they are vital tools for editing page styling.

The category listing page shares an id with the product listing page, so you can't use this method to single it out. You can do it with Smart Backgrounds from Free Addons.

5 Oct 2010, 10:00 AM
#11
beep avatar

beep

New Zenner

Join Date:
Nov 2008
Location:
London
Posts:
94
Plugin Contributions:
0

Re: Removing breadcrumbs from certain pages...

Thanks gjh42,
I actually already have Web Developer and Firebug and had been gazing at the source code for so long it all started looking the same. I had managed to move the breadcrumbs to where I wanted them on the product info page but didn't realise the category listing page shares an id with the product listing page (thinks for letting me know) so it ended up in the wrong place on the category pages. I've put it back now.

I think Smart Backgrounds is a bit extreme for my needs, I only want to move the breadcrumbs for vanity in the first place.

5 Oct 2010, 10:06 AM
#12
beep avatar

beep

New Zenner

Join Date:
Nov 2008
Location:
London
Posts:
94
Plugin Contributions:
0

Re: Removing breadcrumbs from certain pages...

Sorted! I used this and it's exactly what I was looking for and a very simple solution.

#productinfoBody #navBreadCrumb { float:right;
width:470px;}

Now the breadcrumbs float next to the main image on the product info pages and in the top left on listing pages.

:smile: Beep
w w w . r a g a n d m a g p i e . c o . u k