Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Change URL of logo.gif?

Change URL of logo.gif?

Locked

Views: 2,432

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
22 Feb 2010, 3:45 AM
#1
kirkbross avatar

kirkbross

New Zenner

Join Date:
Dec 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Change URL of logo.gif?

In what file do I specify the url for logo.gif in the header? Presently it take you to the store homepage, but I'd like to specify a different url.

22 Feb 2010, 4:25 AM
#2
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: Change URL of logo.gif?

You need to override the following file:

/includes/templates/template_default/common/tpl_header.php

Look for the following line in that file:

<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
```There are several ways to change the URL to point to the desired page you want.

For example, to point to the l*ogin page* instead of the *home page*, you can replace the above code with the following code instead.

```php
<div id="logo"><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT); ?></a></div>
```PS: It's not a good idea to change the logo image to point elsewhere other than the home page because most web users are already used to the default behavior, so use your own discretion.
22 Feb 2010, 10:01 AM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Change URL of logo.gif?

Canopy is correct and it is suggested you add another li to the list in the same file referenced - as in

<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><a href="http://your_main_page_url">Main Site</a></li>
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>

Can insert in any order desired

22 Feb 2010, 8:01 PM
#4
kirkbross avatar

kirkbross

New Zenner

Join Date:
Dec 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: Change URL of logo.gif?

kobra:

Canopy is correct and it is suggested you add another li to the list in the same file referenced - as in

<div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><a href="http://your_main_page_url">Main Site</a></li> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> <?php if ($_SESSION['customer_id']) { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li> ``` > > Can insert in any order desiredThanks -- I had actually just changed the href in the echo line and it seemed to work... out of curiosity, why is it suggested to add a separate line above the echo line?
22 Feb 2010, 8:17 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Change URL of logo.gif?

out of curiosity, why is it suggested to add a separate line above the echo line?
Leaving "Home" and adding another like "Main Home" or?? for the reasons outline by canopy, gets you a nav item prople are used to AND a link to your main/other page

Can be before or after or??

22 Feb 2010, 11:36 PM
#6
kirkbross avatar

kirkbross

New Zenner

Join Date:
Dec 2007
Location:
Los Angeles
Posts:
63
Plugin Contributions:
0

Re: Change URL of logo.gif?

kobra:

Leaving "Home" and adding another like "Main Home" or?? for the reasons outline by canopy, gets you a nav item prople are used to AND a link to your main/other page

Can be before or after or??Actually, this is a link on the logo.gif itself, not the header text links. I got rid of my top header row all together because I am only using my zen cart as a Products Page (no logging in and no shopping cart).

Now I'd like to learn how to add a "Main Home" link in the breadcrumbs so it would look like this:

Main Home :: Products Home :: Category X :: Product X

http://kenrichsounds.com/store/