Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

2 pics in title

Started by olothus on 25 Apr 2012, 6:28 PM · Views: 865

Results 1 to 4 of 4
25 Apr 2012, 6:28 PM
#1
olothus avatar

olothus

New Zenner

Join Date:
Apr 2012
Posts:
3
Plugin Contributions:
0

2 pics in title

Hello Zen Forum....my first post, and question....

Love the forum, it has been some great help....

However I can not figure this one out, and have not been able to find anything on/or close to the subject....

In my pages title across the top, I would like to do logo, title text, and another pic....
[your logo here] [title text] [pic of our REAL store]
instead of the default [your logo] [title text]

the image would be almost the same size as the logo image....
where would I modify the css, ie: which css, in which folder, and what tag.....

(ps: I have a decent understanding of Zen, and custom templates, the proper way to create directories, and copying over the files that you are changing)
(pss: and a very novice grasp of css, but getting there)

25 Apr 2012, 7:00 PM
#2
olothus avatar

olothus

New Zenner

Join Date:
Apr 2012
Posts:
3
Plugin Contributions:
0

Re: 2 pics in title

...or can this even be done...I have seen no examples of this in action....

25 Apr 2012, 7:09 PM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: 2 pics in title

You can add an image to the header (I think that's what you're asking) by placing the HTML for it in tpl_header.php. Give it a class name and you'll be able to move it around in the stylesheet.

25 Apr 2012, 9:20 PM
#4
olothus avatar

olothus

New Zenner

Join Date:
Apr 2012
Posts:
3
Plugin Contributions:
0

Re: 2 pics in title

Ok.....you did not answer my question with exactly what I was looking for, or CORRECTLY.... ;) ....hey at least you knew where to look....which had me beat....

However, you did give me a lead...when I went looking for info about tpl_header.php (to find it's location)...I found this thread:
http://www.zen-cart.com/showthread.php?149305-Adding-2nd-logo-picture-to-header&highlight=add+picture+header

The last answer is the correct one....with code examples as well....

Here is what I had to change (red text was added):

...store/includes/templates/CUSTOM/common/tpl_header.php

<div id="logoWrapper"> <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> <div id="logo2"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO2_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO2_IMAGE, HEADER_ALT_TEXT, HEADER_LOGO2_WIDTH, HEADER_LOGO2_HEIGHT) . '</a>'; ?></div> <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?> <div id="taglineWrapper">

...store/includes/languages/english/CUSTOM/header.php

// added defines for header alt and text
define('HEADER_ALT_TEXT', 'Silver Sword and Stone');
define('HEADER_SALES_TEXT', 'Your Place for Treasures, Uniques, Weapons, and Gems');
define('HEADER_LOGO_WIDTH', '368px');
define('HEADER_LOGO_HEIGHT', '174px');
define('HEADER_LOGO_IMAGE', 'logo.gif');
define('HEADER_LOGO2_WIDTH', '300px');
define('HEADER_LOGO2_HEIGHT', '174px');
define('HEADER_LOGO2_IMAGE', 'MYNEWPIC.gif');

...store/includes/templates/CUSTOM/css/stylesheet.css

#logo2 {
float: right;
}

and that fixed me up.....