Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    help question How to remove breadcrumbs from non-store pages?

    What I want to achieve:

    1) remove the "Home" link from breadcrumbs
    2) remove the breadcrumbs from all pages except categories/subcategories/product pages.

    I have easily done the first part by commenting the line

    Code:
    $breadcrumb->add(HEADER_TITLE_CATALOG, zen_href_link(FILENAME_DEFAULT));
    in the file /includes/init_includes/overrides/init_add_crumbs.php as per DrByte's instructions in another post.

    Coming to the second part: from various posts read, I understand that this has to be done on a page-by-page basis (unfortunately ). I found in a post that the breadcrumb can be removed, in the Gift Certificate FAQ page for example, by commenting the line

    Code:
    $breadcrumb->add(NAVBAR_TITLE);
    in file /includes/modules/pages/gv_faq/header_php.php

    Commenting does remove the breadcrumb but not its placeholder and the page title and contents are not taking its place, leaving a blank space.

    Any good suggestions please? I will be grateful!

  2. #2
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    Re: Removing breadcrumbs from certain pages...

    You don't have to code for it- you can use the CSS ...
    #PAGE_ID .breadCrumb { display: none;}
    The above is from a very old post by Kim (http://www.zen-cart.com/forum/showthread.php?t=47435) and gave me the clue to do it with CSS. It wasn't very clear (to me) what the #PAGE_ID... line represented but, after struggling for hours, I came up to adding the following to my /includes/templates/my_template/css/stylesheet.css file without changing any php files except for the change in /includes/init_includes/overrides/init_add_crumbs.php to remove the Home link:

    #aboutusBody #navBreadCrumb{ display: none; }
    #contactusBody #navBreadCrumb{ display: none; }
    #conditionsBody #navBreadCrumb{ display: none; }
    #privacyBody #navBreadCrumb{ display: none; }
    #paymentsBody #navBreadCrumb{ display: none; }
    #shippinginfoBody #navBreadCrumb{ display: none; }
    #destinationsBody #navBreadCrumb{ display: none; }
    #artBody #navBreadCrumb{ display: none; }
    #dvdinfoBody #navBreadCrumb{ display: none; }
    #unsubscribeBody #navBreadCrumb{ display: none; }
    #sitemapBody #navBreadCrumb{ display: none; }
    #gvfaqBody #navBreadCrumb{ display: none; }

    The characters between # and Body on each line, are the page names in my Information box and include a lot of custom pages I have created. These lines removed all the breadcrumbs and their place was taken by the page title, that's exactly what I wanted to achieve. I have not touched the breadcrumbs for the categories/product pages as I want them to stay as they are.

    If Kim or another expert is around, could they please confirm that what I've done is correct? Thanks in advance for any assistance.

  3. #3
    Join Date
    Oct 2010
    Posts
    2
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    Hi,

    I tried using #aboutusBody #navBreadCrumb{ display: none; } for one of my EZpages, to prevent it from displaying breadcrumbs. Between # and Body I gave the Ez PAGE NAME, but its not working for me. I tried coding with EZ page ID like #71Body #navBreadCrumb{ display: none; }, but it is not working. How do I know what is the exact page name for the EZ page? I am fairly new to the forum and 2 months old at using Zencart. It would be great if you could help me.

    Thanks,
    Grace

  4. #4
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    Hello Grace,

    As you have seen, there has been no response to my question whether what I did was correct or not. The thing is that it works for me!

    Far from being a programmer, I have made a lot of changes to my stylesheet, mostly on a trial and error basis and I have gained some knowledge by playing around. I would be glad to help you (if I can) but need the URL of the page you are trying to change. If you don't want to publish it in the forums, you may send me a message via the contact us form on either of my sites listed in the signature block.

    To respect the forum rules, I have to make clear that I'm not offering professional advice here, just user to user help and that this is not charged. My fee will be the pleasure of helping a fellow member as I have been helped by others. Due to family activities during the weekend, I may not be able to come back before the beginning of next week.

  5. #5
    Join Date
    Apr 2006
    Posts
    178
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    Hi. I too am trying to remove the breadcrumbs from some specific pages. After some testing this method works great for me in every circumstance (throughout the 'Information' pages), with the exception of every single page I actually want them removed from! These pages specifically are the 'Contact us' page and also my defined pages. I'm not sure how these pages differ from the other ones and so any advice as to how you acheived this Athens (or anyone) would be greatly appreciated.

    If this has any bearing on the issue, I should point out that I have renamed my defined pages as About Us, Company, etc although the url produced still reads as index.php?main_page=page_2, index.php?main_page=page_3, etc.

    Thanks in advance!

  6. #6
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    Hi, I have disabled breadcrumbs with some extra lines in the stylesheet.css (a few are shown below).

    #aboutusBody #navBreadCrumb{ display: none; }
    #contactusBody #navBreadCrumb{ display: none; }
    #conditionsBody #navBreadCrumb{ display: none; }
    #privacyBody #navBreadCrumb{ display: none; }
    #paymentsBody #navBreadCrumb{ display: none; }
    #shippinginfoBody #navBreadCrumb{ display: none; }
    #destinationsBody #navBreadCrumb{ display: none; }

    The bolded parts are the page names.

    I hope this helps.
    Last edited by Athens Collectibles; 12 Mar 2011 at 08:28 PM. Reason: corrections

  7. #7
    Join Date
    Apr 2006
    Posts
    178
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    Hi, thanks for the speedy response! I now see why it didn't work for Contact us, I added an underscore (#contact_usBody) as I thought I was referencing the page name from the url. So where exactly are you finding these PAGE IDs from as I expect this is why I was unable to get this to work with my defined pages?

    Thanks again.

  8. #8
    Join Date
    Apr 2006
    Posts
    178
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    Small update, I have got this to work by removing the underscores from the defined page urls eg, #page2Body #navBreadCrumb{ display: none; }. So thanks for sharing your solution, but I'd still like to know why this works if you have any idea?! What exactly are we referencing?

  9. #9
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    No idea how it works, but it does!

    What I do is go to each page I want to remove breadcrumbs from and look at the URL in the browser. For example:

    http://athenscollectibles.info/index..._page=about_us

    I use the last part (about_us) without the underscore to form the CSS line:

    #aboutusBody #navBreadCrumb{ display: none; }

    It doesn't work if I leave the underscore but don't ask me why. I don't use Easy Pages but, as you discovered, it works on the same principle (page2Body rather than page_2Body). A Zen Cart guru could provide an explanation. Although it works as described, it would still be good to learn what's behind it.

  10. #10
    Join Date
    Apr 2006
    Posts
    178
    Plugin Contributions
    0

    Default Re: How to remove breadcrumbs from non-store pages?

    Ha ha, I see you're using the same 'hit and hope' method of web design that I am! Thanks again.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h how to remove breadcrumb from ez-pages and defined pages
    By snk060 in forum General Questions
    Replies: 3
    Last Post: 11 Nov 2013, 04:40 PM
  2. Removing breadcrumbs from certain pages...
    By Alex Clarke in forum General Questions
    Replies: 11
    Last Post: 5 Oct 2010, 11:06 AM
  3. Remove Header Links & Breadcrumbs From Checkout
    By games4gamers in forum General Questions
    Replies: 10
    Last Post: 1 Apr 2010, 08:42 PM
  4. Remove Breadcrumbs from Login, Shopping Cart and Checkout Pages
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 25 Apr 2009, 07:17 PM
  5. How To Remove Heading from pages that EZ Pages creates
    By madkaw9 in forum Customization from the Admin
    Replies: 5
    Last Post: 24 Feb 2009, 02:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg