PDA

View Full Version : Alt image text


Bun
11-Aug-2006, 08:16 AM
Just wondering if someone can help me here?

I've noticed that in catalog when adding a 'short description' to a product it uses this description for the alt image text also. Is there a way to change this alt image text without changing the 'short descrpition'?

Thank you for your time

NormanRouxel
11-Aug-2006, 08:28 AM
Create a Custom Property called ALTTEXT.

Replace Act_ProductImage.html with
<!-- ProductImage HTML begin -->
<!-- This file is used to build the product image markup. -->

<IMG SRC="NETQUOTEVAR:IMAGEFILE"
ALT="CUSTOMVAR:ALTTEXT"
TITLE="CUSTOMVAR:ALTTEXT"
BORDER=0
NETQUOTEVAR:IMAGEHEIGHT
NETQUOTEVAR:IMAGEWIDTH
NETQUOTEVAR:OTHERIMAGEMARKUP>
<!-- NETQUOTEVAR:ALTERNATETEXT -->

<!-- This file is used to build the product image markup. -->
<!-- ProductImage HTML end -->

In Design / Options / Site Defaults / Properties set ALTTEXT to a default value, e.g. "Product Image".

Now you can set this Property at the product level as required.

P.S. I added in a TITLE parameter as this will allow the alt text to show in Firefox.

RobSollars
11-Aug-2006, 08:29 AM
I think I might be able to help with this one.

If you open up Act_ProductImage.html in your favourite text editing application, you should probably see a few lines closely resembling:

<IMG SRC="NETQUOTEVAR:IMAGEFILE"
ALT="NETQUOTEVAR:ALTERNATETEXT"
BORDER=0
NETQUOTEVAR:IMAGEHEIGHT
NETQUOTEVAR:IMAGEWIDTH
NETQUOTEVAR:OTHERIMAGEMARKUP>

If you change the ALT="NETQUOTEVAR:ALTERNATETEXT" bit, you can insert whatever you want between the quotation marks. This should change the alt text for the product's image wherever it appears.

It really is wortwhile to have some keyword rich, relevant text in the alt tags, not only to aid accessibility, but also because it's excellent for SEO.
________
Jozephina (http://camslivesexy.com/cam/Jozephina)

RobSollars
11-Aug-2006, 08:31 AM
Beaten by a scant few seconds! Norman's solution is excellent, since you can set the CUSTOMVAR property seperately for each product, thus yielding more effective SEO on each product.
________
BESOCHOCOLATE cam (http://camslivesexy.com/cam/BESOCHOCOLATE)

Bun
11-Aug-2006, 09:03 AM
Cheers fellas......that worked a treat.

NormanRouxel
11-Aug-2006, 09:22 AM
Just one point to note. Make sure you don't use the double quote character ( " ) in your Custom Property value as this will probably break the image tag.

Bun
11-Aug-2006, 06:15 PM
Just one point to note. Make sure you don't use the double quote character ( " ) in your Custom Property value as this will probably break the image tag.

Point noted

It worked a treat, Norman......now I can have description text that is completely different to my alt image text......just what I was after!!

Thank you for your time and patience

RuralWeb
11-Aug-2006, 06:54 PM
Just beware of Alt SPAMMING, SEs are aware it happens and look for it:eek:

Bhujang
11-May-2012, 08:12 AM
Create a Custom Property called ALTTEXT.

Replace Act_ProductImage.html with
<!-- ProductImage HTML begin -->
<!-- This file is used to build the product image markup. -->

<IMG SRC="NETQUOTEVAR:IMAGEFILE"
ALT="CUSTOMVAR:ALTTEXT"
TITLE="CUSTOMVAR:ALTTEXT"
BORDER=0
NETQUOTEVAR:IMAGEHEIGHT
NETQUOTEVAR:IMAGEWIDTH
NETQUOTEVAR:OTHERIMAGEMARKUP>
<!-- NETQUOTEVAR:ALTERNATETEXT -->

<!-- This file is used to build the product image markup. -->
<!-- ProductImage HTML end -->

In Design / Options / Site Defaults / Properties set ALTTEXT to a default value, e.g. "Product Image".

Now you can set this Property at the product level as required.

P.S. I added in a TITLE parameter as this will allow the alt text to show in Firefox.

Hi Norman

This looks like what I need. I was just about to write a thread then did a search first. How do I create a custom property?
When I looked in the design tab the only options was design options and I cant find site defaults in there... Can you advise further for a newbie...

Thanks Bhu

Bhujang
11-May-2012, 08:15 AM
PS

Also what if the image I want to add the alt text to is the brochure image and company logo image will the amedment you described above also allow that alt text to be changed?

Best wishes

Bhu

peblaco
11-May-2012, 11:14 AM
When I looked in the design tab the only options was design options and I cant find site defaults in there...

This topic and section is for Actinic v7 and earlier, if you don't have Options > Site Defaults it sounds like you are on a later version. Find your version by opening Actinic and going to your Help menu > About. In version 7 custom variables can be made at Advanced menu > Custom Properties.

Instructions below are for later versions (8/9/10/11):
Create variable: Design > Library > Variables tab (Right click > New variable).
Logo layouts: Design > Library > Layouts > Brochure Logo Image > Standard Brochure Logo Image and also in Layouts > Company Logo Image > Standard Company Logo Image.
Product image layout: Design > Library > Layouts > Product Image > Standard Product Image.

Bhujang
11-May-2012, 11:43 AM
Hi Pebleco

Thanks for the reply. Yes I am running version 11

I found the places you mention but have no cl;ue how to add a text such as Norman offered for a previous version into version 11

The alt is set at productname

Also on the brochure image I didnt have a clue how to amend the alt for that image either...

I am new to all this so any further pointers and hints would be great

Cheers

Bhu

Bhujang
11-May-2012, 11:51 AM
Ok so I created a variable what will assign that to the alt text of an image?

:)

Cheers

Bhu

peblaco
11-May-2012, 12:06 PM
Ok so I created a variable what will assign that to the alt text of an image?

You'd have to open the layout and replace the Actinic variable in the alt tag with your own variable name. Secondly if you edit your variable in the library you can set a place of setting which defines where the field appears in Actinic i.e. Site / Section / Product and which menu tab. You can then go to the place of setting, i.e. a product and fill in the text on the field.

Bhujang
11-May-2012, 01:43 PM
Ok i created a variable called ALT TEXT I then replaced the PoductNAme in the location you said for the alt html and then in the product entered the text in the ALT TEXT box thats now there in properties...

But in store preview it has no affect... Still uses the ProductName as the Alt info...

Maybe I need to upload it to my server to see it working?

Any Ideas?

Cheers

Bhu

peblaco
11-May-2012, 01:48 PM
But in store preview it has no affect... Still uses the ProductName as the Alt info...

Sounds like you've done it right. I can't tell where you've gone wrong. You could check the code you added into the product image layout (you could post it here). Also which product layout are you using?.

Bhujang
11-May-2012, 02:53 PM
Well I tried it onthe server and still no joy :( Not sure why, here is the html as is:

title="<actinic:variable name="ProductName" encoding="strip"/>"
alt="<actinic:variable name="ALT TEXT" encoding="strip"/>"
</actinic:block>

<actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e%20%3d%3d%20False">
<img src="<actinic:variable name="DefaultProductImage" />"
border="0"
title="<actinic:variable name="ProductName" encoding="strip"/>"
alt="<actinic:variable name="ALT TEXT" encoding="strip"/>"
</actinic:block>

As you can see both alt lines have been changed to the variable input and the the input text added but the page still shows the productname tag for the alt text..

Can anyone please shed some light here for me...

Thanks

Bhu

PS im using the silver layout...

peblaco
11-May-2012, 03:04 PM
Have you checked the HTML source of the page to see if the alt tag is being changed or are you just putting your mouse over the image?. You may want to change the "title" tag on the image as well as the "alt" because it is still using ProductName and depending which web browser you are using some display the alt tag when you mouse over and some use the title tag.

Duncan Rounding
11-May-2012, 03:07 PM
Perhaps try removing the space in your variable name.

Bhujang
11-May-2012, 03:32 PM
Took the space out then had to do the same for the variable to make it match and still no joy!

I have given up for now!

Bhujang
11-May-2012, 03:48 PM
Have you checked the HTML source of the page to see if the alt tag is being changed or are you just putting your mouse over the image?. You may want to change the "title" tag on the image as well as the "alt" because it is still using ProductName and depending which web browser you are using some display the alt tag when you mouse over and some use the title tag.

I was using the mouse over. I did check the html within catalogue and it said ALTTEXT rather than ProductName so it had changed according to the library. I will try again now and change the title tag as well...

Thanks again

Bhu

peblaco
11-May-2012, 03:56 PM
Looks like you found the culprit. :)

Bhujang
11-May-2012, 04:00 PM
Have you checked the HTML source of the page to see if the alt tag is being changed or are you just putting your mouse over the image?. You may want to change the "title" tag on the image as well as the "alt" because it is still using ProductName and depending which web browser you are using some display the alt tag when you mouse over and some use the title tag.

Nice one Peblaco that did the trick... I use explorer and it would seem that it uses the title tag to show the alt description :)

All working well now :)

Thanks for all your help

Best wishes

Bhu