Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

change where the top button links to


Guest

Recommended Posts

I have been trying to find how the top button in the

>includes/application_top.php

can be made to point to a url other than the root of the web server?

can any genious please advise

Link to comment
Share on other sites

Thanks billy but i was there 24 hrs ago

that gives the help how to change the button name or remove it,

I need the top button to take the user to a url other than the root of the web domain.

Link to comment
Share on other sites

Thanks i will go back, Think ive been looking at this bit so long now im getting lost within it

Cheers

Len

 

 

Im now drowning in php

 

this is my code that i think you refer to but where do i put myurl.htm ??

could you please explain.

 

 

###############

 

starting at line 13

 

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;

}

}

?>

 

#################

 

many thanks

Len

Link to comment
Share on other sites

Thanks i will go back, Think ive been looking at this bit so long now im getting lost within it

Cheers

Len

 

 

Im now drowning in php

 

this is my code that i think you refer to but where do i put myurl.htm ??

could you please explain.

 

 

###############

 

starting at line 13

 

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;

}

}

?>

 

#################

 

many thanks

Len

Link to comment
Share on other sites

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

 

 

i just add a if statmet that identifes which link we want to change then change it

Link to comment
Share on other sites

ok in your application_top.php you have a line like this

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

thats for your top so if you want to change your root catalog to point to the index page say you would do instead"

$breadcrumb->add(HEADER_TITLE_TOP, tep_href_link(FILENAME_DEFAULT));

Link to comment
Share on other sites

ok in your application_top.php you have a line like this

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

thats for your top so if you want to change your root catalog to point to the index page say you would do instead"

$breadcrumb->add(HEADER_TITLE_TOP, tep_href_link(FILENAME_DEFAULT));

Link to comment
Share on other sites

ok in your application_top.php you have a line like this

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

thats for your top so if you want to change your root catalog to point to the index page say you would do instead"

$breadcrumb->add(HEADER_TITLE_TOP, tep_href_link(FILENAME_DEFAULT));

 

 

 

This code change is just the job!

Thankyou,

WORKING FINE NOW!

Len

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...