Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How do I write alt="" text for my site Logo Image?

How do I write alt="" text for my site Logo Image?

Views: 3,290

Results 1 to 8 of 8
20 Nov 2009, 6:53 AM
#1
sandrasd avatar

sandrasd

New Zenner

Join Date:
Jun 2009
Posts:
85
Plugin Contributions:
0

How do I write alt="" text for my site Logo Image?

Hi.

I am trying to I write alt="" text for my site Logo Image.
As I understand I should be going it in /includes/languages/english/MyTemplate/header.php

in this section:
// added defines for header alt and text
define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce');
define('HEADER_SALES_TEXT', 'TagLine Here');
define('HEADER_LOGO_WIDTH', '');
define('HEADER_LOGO_HEIGHT', '');
define('HEADER_LOGO_IMAGE', 'logo.gif');

I changed it there uploaded the file and nothing happened...
Does anyone know what I am doing wrong??

20 Nov 2009, 9:32 AM
#2
jcdk avatar

jcdk

Zen Follower

Join Date:
Oct 2009
Location:
Netherlands - NB
Posts:
144
Plugin Contributions:
0

Re: How do I write alt="" text for my site Logo Image?

Hi,

You can change this text in the templates section:

templates/YOUR_TEMPLATE/

Here you can change the ALT text of the images html inside the **main page **and header. (wherever the pic is called)

I changed this for my main page image in the main page (html includes folder)

It is not in your language folder

20 Nov 2009, 12:03 PM
#3
sandrasd avatar

sandrasd

New Zenner

Join Date:
Jun 2009
Posts:
85
Plugin Contributions:
0

Re: How do I write alt="" text for my site Logo Image?

Hi, thanks for your reply.

Are you saying I can change it in includes/templates/MyTemplate/common/tpl_header.php??

I tried to do it in this section

<!--bof-header logo and navigation display--> <div class="indent"><a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/ logo.gif'); ?></a><br /> </div>

I managed to change image (logo) name, but don't see anywhere where I can input alt="" tag... for the logo

Or did I not understand you correctly??

Thanks again.

20 Nov 2009, 12:17 PM
#4
jcdk avatar

jcdk

Zen Follower

Join Date:
Oct 2009
Location:
Netherlands - NB
Posts:
144
Plugin Contributions:
0

Re: How do I write alt="" text for my site Logo Image?

I made a mistake, the header logo differs from the main page image (which is in the template file).

The logo alt text is indeed in the language files, like this thread explains:

http://www.zen-cart.com/forum/showthread.php?t=120619

This tutorial provides the same information:

https://www.zen-cart.com/tutorials/index.php?article=125

20 Nov 2009, 10:24 PM
#5
sandrasd avatar

sandrasd

New Zenner

Join Date:
Jun 2009
Posts:
85
Plugin Contributions:
0

Re: How do I write alt="" text for my site Logo Image?

Thanks.

So it looks like I am back to where I started...
with the same results...

I changed it where I supposed to... in /includes/languages/english/MyTemplate/header.php

in this section:
// added defines for header alt and text
define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce');
define('HEADER_SALES_TEXT', 'TagLine Here');
define('HEADER_LOGO_WIDTH', '');
define('HEADER_LOGO_HEIGHT', '');
define('HEADER_LOGO_IMAGE', 'logo.gif');

I uploaded the file and nothing happened...

I only managed to change image (logo) name in includes/templates/MyTemplate/common/tpl_header.php??

I did it in this section

<!--bof-header logo and navigation display--> <div class="indent"><a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/ logo.gif'); ?></a><br /> </div>

but it did not solve my other problem with alt="" tag...

Does anyone know what else could be done??

21 Nov 2009, 6:30 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How do I write alt="" text for my site Logo Image?

Your custom template has changed the original code in tpl_header.php, and in so doing they removed the functionality that normally would work if you simply edited the header.php language file as you had mentioned earlier.

The original code for displaying the logo in tpl_header.php is this:```
zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT)


Remember: every addon you install may or may not have had original features removed by whoever packaged the addon ... this could be because they didn't want the feature and didn't choose to turn it off via a built-in method, or they wanted to make it work another way. Some addons are built short-sighted simply to meet an immediate need, and others are built for optimal benefit to all who might choose to use them. Your mileage may vary with each. It's a chance you take.
26 Nov 2009, 12:34 PM
#7
sandrasd avatar

sandrasd

New Zenner

Join Date:
Jun 2009
Posts:
85
Plugin Contributions:
0

Re: How do I write alt="" text for my site Logo Image?

DrByte, you are my HERO!
It worked. Thanks :):clap:

9 Feb 2011, 6:21 PM
#8
noodles1971 avatar

noodles1971

New Zenner

Join Date:
Mar 2010
Posts:
30
Plugin Contributions:
0

Re: How do I write alt="" text for my site Logo Image?

Hi,
Just wondering what might be wrong when the Alt text for my (non-product) images doesn't show at all, even though the text is defined?
Thanks.