Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / hide breadcrumbs for specific category

hide breadcrumbs for specific category

Views: 1,948

Results 1 to 8 of 8
11 Jun 2011, 7:50 PM
#1
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

hide breadcrumbs for specific category

I'm using some landing pages as subcategories of a "Landing Pages" category. Let's say Landing Pages is category 50. How can I modify the code below to hide the breadcrumbs display when category 50 is being browsed, affecting all subcategories as well?

Basically I'm hoping I can simply add something next to the $this_is_home_page condition.

Two problems that may exist for accomplishing this:

  1. 1'm using Ceon SEO URIs, so if the code references the current page URL, it won't find the conditional category number. It also won't find the parent category name in the URL, as I'm formatting such landing pages to be "www.mysite.com/Widgets1" rather than "www.mysite.com/Landing Pages/Widgets1".

  2. The 'path' URL parameter shows subcategories as 50_4, and I'm really concerned about parent category 50.

But if there is a way for the code to determine the category

Here's the existing code from tpl_main_page.php.

<!-- bof  breadcrumb -->
<?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?>
<!-- eof breadcrumb -->
11 Jun 2011, 7:54 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,790
Plugin Contributions:
14

Re: hide breadcrumbs for specific category

How about adding a css for that cat with a display: none for the breadcrumb.

Readme in the css folder.

11 Jun 2011, 8:11 PM
#3
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: hide breadcrumbs for specific category

As you suspected, I didn't know about the css method. So I tried that with c_50.css, but it doesn't apply to subcategories, such as 50_3. Am I going to need to create another file for each subcategory?

11 Jun 2011, 8:28 PM
#5
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: hide breadcrumbs for specific category

That's perfect and seems to work well, thanks!

11 Jun 2011, 8:41 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,790
Plugin Contributions:
14

Re: hide breadcrumbs for specific category

Glad you got it going. The forum search is not as sentient as Google. I have a firefox add-on that allows me to add any site's search to the Google search bar. First item was the answer.

If you use a different browser or can't get the add on working, you can always Google> site:https://www.zen-cart.com whatever you need to findAnother advantage to the use of Google is the ability to use literals (surrounding your search with quotes).

12 May 2012, 6:30 AM
#7
wycliffn avatar

wycliffn

New Zenner

Join Date:
May 2012
Posts:
2
Plugin Contributions:
0

Re: hide breadcrumbs for specific category

fakeDecoy:

That's perfect and seems to work well, thanks!

Thanks man for your insight.

I would like to link different banners to particular categories, can you advise me on how to achieve it.
Thanks

13 May 2012, 7:08 AM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: hide breadcrumbs for specific category

wycliffn:

Thanks man for your insight.

I would like to link different banners to particular categories, can you advise me on how to achieve it.
Thanks

Are you talking about different banners governed by the banner boxes in admin >>> tools >>> banner manager?

... or different header logos?