osCmax v2.5 User Manual
Results 1 to 3 of 3

Need help with my header file..

This is a discussion on Need help with my header file.. within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; In my header, after I screwed up my site yesterday, the word Top no longer links back to my main ...

      
  1. #1
    New Member
    Join Date
    May 2003
    Posts
    5
    Rep Power
    0


    Default Need help with my header file..

    In my header, after I screwed up my site yesterday, the word Top no longer links back to my main website page.

    If my investigation of the php files is correct, that info seems to be stored in breadcrumb.php. If so, how would I modify it so that the link will work again?

  2. #2
    Lurker
    Join Date
    Aug 2003
    Posts
    4
    Rep Power
    0


    Default

    The easiest fix is to copy a clean breadcrumb.php. I am copying mine below:
    <?php
    /*
    $Id: breadcrumb.php,v 1.3 2003/02/11 00:04:50 hpdl Exp $

    osCommerce, Open Source E-Commerce Solutions
    http://www.oscommerce.com

    Copyright (c) 2003 osCommerce

    Released under the GNU General Public License
    */

    class breadcrumb {
    var $_trail;

    function breadcrumb() {
    $this->reset();
    }

    function reset() {
    $this->_trail = array();
    }

    function add($title, $link = '') {
    $this->_trail[] = array('title' => $title, 'link' => $link);
    }

    function trail($separator = ' - ') {
    $trail_string = '';

    for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) {
    if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) {
    $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';
    } else {
    $trail_string .= $this->_trail[$i]['title'];
    }

    if (($i+1) < $n) $trail_string .= $separator;
    }

    return $trail_string;
    }
    }
    ?>

  3. #3
    Lurker
    Join Date
    Aug 2003
    Posts
    4
    Rep Power
    0


    Default

    In fact in my case, I wanted to eliminate the TOP link. So I started the Trail with the next position(catalog) as follows:
    for ($i=1, $n=sizeof($this->_trail); $i<$n; $i++) {

    note the i=1 instead of i=0

Similar Threads

  1. Problem with the header.php file
    By emikey24 in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 04-07-2005, 02:43 PM
  2. Need help with header...
    By LatinPrince in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 02-14-2005, 09:06 AM
  3. Header change and other changes
    By sagarc in forum osCommerce 2.2 Modification Help
    Replies: 4
    Last Post: 12-14-2004, 01:22 PM
  4. Conditional formatting in header.php file
    By ReginaStelling in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 08-03-2004, 11:08 AM
  5. header / header.php top logo problem
    By the_error_king in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 04-05-2004, 05:02 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
  •