Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2007
    Location
    Western New York
    Posts
    48
    Plugin Contributions
    0

    Default breadcrumb change-simple but frustrating!

    Hi all,

    I have an INDEX page

    http://www.knottybynature-ny.com

    and I have a MAIN STORE PAGE

    http://knottybynature-ny.com/index.php?main_page=


    I have changed the header so it has 2 links: one to the "main" (index) page, one to the "shop home" (main store page).

    What I can't seem to change is the navigational breadcrumb "home" link, which is also in my footer. I would like this link to take my customers to the MAIN STORE PAGE. I know I have to go to includes/classes/breadcrumb.php for the change, but I don't know exactly WHAT I'm changing, and to what do I change it?

    Your help is greatly appreciated!!

    Cat
    [FONT="Georgia"]Knotty By Nature, Custom Fine Silver Jewelry[/FONT]
    http://www.knottybynature-ny.com

  2. #2
    Join Date
    Jul 2007
    Location
    Western New York
    Posts
    48
    Plugin Contributions
    0

    Default Re: breadcrumb change-simple but frustrating!

    Solved it.

    in breadcrumbs.php, i changed this area:



    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= ' [COLOR="Red"]<a href="http://www.knottybynature-ny.com/index.php?main_page=">[/COLOR]' . $this->_trail[$i]['title'] . '</a>';

    i hope this helps someone else. this did not change my "shop home" link in the footer, but I think that's in english.php
    [FONT="Georgia"]Knotty By Nature, Custom Fine Silver Jewelry[/FONT]
    http://www.knottybynature-ny.com

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: breadcrumb change-simple but frustrating!

    Took me a minute to figure the above.. Thought I'd clarify for others.. Replace the section in red with the URL you want to point the "Home" breadcrumb to:
    Code:
    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= '  <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';

  4. #4
    Join Date
    Aug 2009
    Location
    Toronto, ON (Canada)
    Posts
    4
    Plugin Contributions
    0

    Default Re: breadcrumb change-simple but frustrating!

    Quote Originally Posted by knottybynature View Post
    Solved it.

    in breadcrumbs.php, i changed this area:



    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= ' [COLOR="Red"]<a href="http://www.knottybynature-ny.com/index.php?main_page=">[/COLOR]' . $this->_trail[$i]['title'] . '</a>';

    i hope this helps someone else. this did not change my "shop home" link in the footer, but I think that's in english.php

    Hi.... where exactly is the breadcrumbs.php file?

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: breadcrumb change-simple but frustrating!

    Quote Originally Posted by ChaoticKitty View Post
    Hi.... where exactly is the breadcrumbs.php file?
    Location is given in the very first post of this thread..

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: breadcrumb change-simple but frustrating!

    If you want to link to the base URL (www .mysite .com), just remove the
    . DIR_WS_CATALOG
    PHP Code:
    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= '  <a href="' HTTP_SERVER '">' $this->_trail[$i]['title'] . '</a>'

  7. #7
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: breadcrumb change-simple but frustrating!

    Quote Originally Posted by gjh42 View Post
    If you want to link to the base URL (www .mysite .com), just remove the
    . DIR_WS_CATALOG
    PHP Code:
    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= '  <a href="' HTTP_SERVER '">' $this->_trail[$i]['title'] . '</a>'
    Okay Glenn.. I get this..

    So pardon me for being dense and asking a dumb question..

    If I want my home breadcrumb to point to
    http://www.mydomain.com/my_home_page

    Could I do this? (and PLEASE don't laugh if this is wrong.. )
    PHP Code:
    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= '  <a href="' HTTP_SERVER my_home_page '">' $this->_trail[$i]['title'] . '</a>'

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: breadcrumb change-simple but frustrating!

    **deleted**
    Last edited by DivaVocals; 30 Sep 2009 at 04:45 AM.

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: breadcrumb change-simple but frustrating!

    So I get it now.. (which is why I'm responding to my own post.. )

    If you want to point your "Home" breadcrumb link to a different ZEN CART page other than the main Zen Cart page, for example:
    Main Zen Cart Page: http://www.yourdomain.com/
    Other Zen Cart Page to link the "Home" breadcrumb to: http://www.yourdomain.com/store_main
    (In this example I am using a Zen Cart SEO add-on so the URL is a "friendly" Zen Cart URL)

    Starting at around line 55 find the code highlighted in red
    Code:
     
     // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
     if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
     $trail_string .= '  <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';
    Change as shown below (note the new path highlighted in blue added):
    Code:
     
    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= '  <a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'store_main">' . $this->_trail[$i]['title'] . '</a>';
    Here's an example using a non SEO friendly URL (in this case an EZ Page)
    http://www.yourdomain.com/index.php?main_page=page&id=3
    Code:
     
     // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
     if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
     $trail_string .= '  <a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'index.php?main_page=page&id=3">' . $this->_trail[$i]['title'] . '</a>';
    Please note the part in blue is everything after the main path of your Zen Cart URL (do not include the "/")

    Just so it's clear ('cause I sure needed to get it straight in my head), the change Glenn posted is how you would modify the breadcrumb file if you had both a Zen Cart store and a separate main site.
    For example:
    Main Site Home Page: http://www.yourdomain.com
    Store Main/Home Page: http://www.yourdomain.com/store

    In this case you might want your store's "Home" breadcrumb link to point to the main site versus the Zen Cart main page..

    Piggybacking on Glenn's post:
    Quote Originally Posted by gjh42 View Post
    If you want to link to the base URL (www .mysite .com), just remove the
    . DIR_WS_CATALOG
    PHP Code:
    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= '  <a href="' HTTP_SERVER '">' $this->_trail[$i]['title'] . '</a>'
    If you wanted to point your Zen Cart store's "Home" breadcrumb link to another page within your main site for example:
    Main Site Home Page: http://www.yourdomain.com
    Other Main Site Page to link the "Home" breadcrumb to: http://www.yourdomain.com/other_page.html
    Code:
     
    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= '  <a href="' . HTTP_SERVER . '/other_page.html">' . $this->_trail[$i]['title'] . '</a>';
    Please note in this example, you MUST include the "/"

    Alright.. done rambling now.. everyone go back to your normal programming..







    Quote Originally Posted by DivaVocals View Post
    Okay Glenn.. I get this..

    So pardon me for being dense and asking a dumb question..

    If I want my home breadcrumb to point to
    http://www.mydomain.com/my_home_page

    Could I do this? (and PLEASE don't laugh if this is wrong.. )
    PHP Code:
    // this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
    if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
    $trail_string .= '  <a href="' HTTP_SERVER my_home_page '">' $this->_trail[$i]['title'] . '</a>'

 

 

Similar Threads

  1. Simple Dropdown causing odd Breadcrumb behavior
    By Hell Guapo in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 18 Jan 2012, 10:44 AM
  2. Column layout is good in Firefox but Internet Explorer is frustrating.
    By Blackwaterphil in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 25 Dec 2009, 02:57 AM
  3. Change Breadcrumb Trail on Page 2,3,4
    By traders in forum General Questions
    Replies: 7
    Last Post: 14 Jul 2009, 04:06 PM
  4. Breadcrumb Trail Background change.
    By uruharacosplay in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Mar 2008, 06:43 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR