Adding a title tag to images

General ShopSite user discussion

Adding a title tag to images

Postby Feydakin » Wed Dec 16, 2009 2:04 pm

I thought I had it beat :)

I added

Code: Select all
title="[-- LINK.text --]"


as a WAG as to what the link text tag would be.. I've been searching for it in the cookbook and here on the forums and not having much luck.. I figure as long as I'm updating alt tags I should add title tags as well..
Animal Charms : Animal jewelry that gives back
Feydakin
 
Posts: 42
Joined: Wed Jul 23, 2008 11:24 am
Location: Indiana

Postby Jim » Wed Dec 16, 2009 2:16 pm

The html output to display images is contained in a file in the same directory as the image. The only way to add content to the attributes of an image is to enter it in the Images > Edit Image screen, There you can set size, border, spacing, alt text and other options. You could add the title="your text" to the Other attributes: section for each image. Note that you can not use template tags in that area so you couldn't use the [-- LINK.text --] tag but would have to input the actual text.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Feydakin » Wed Dec 16, 2009 2:37 pm

Yeah, that's what I was thinking I would have to do..

We've written our own offline product database and I'll have to look in to putting this option in to that for when we do our product uploads..

Thanks -
Animal Charms : Animal jewelry that gives back
Feydakin
 
Posts: 42
Joined: Wed Jul 23, 2008 11:24 am
Location: Indiana

Postby Jim » Wed Dec 16, 2009 2:43 pm

There is no option for uploading the attributes to the images so It probably won't do much good to put it in your database.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Feydakin » Wed Dec 16, 2009 2:47 pm

Sounds like another service pack update then :)

Easy title and alt tags (where they pull the product name automatically rather than the image filename) would be a great thing..
Animal Charms : Animal jewelry that gives back
Feydakin
 
Posts: 42
Joined: Wed Jul 23, 2008 11:24 am
Location: Indiana

Postby Jim » Wed Dec 16, 2009 2:59 pm

When you upload images there is no relationship to a product. Even if there were you could use the same image on multiple products so which one would you chose to use as the title?

An alternate way to do the images is to use the tag [-- image product.graphic --] which returns just the image name. You could then build the entire tag to display the image based on data you put in custom fields.
You can also use the [-- PRODUCT.Graphic Remove_HTML --] Which returns all information defined for the product graphic including the file path and attributes and then append your title tag to that.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Feydakin » Fri Dec 18, 2009 12:24 pm

We've been playing with this some more and still not getting there..

We edited the Product-Graphic include and renamed it ac-product-graphic..

Then, where the product template called the
Code: Select all
####################
#  PRODUCT GRAPHIC #
####################
[-- INCLUDE Product-Graphic PROCESS --]


changed to
Code: Select all
####################
#  PRODUCT GRAPHIC #
####################
[-- INCLUDE ac-product-graphic PROCESS --]


But, it does not seem to be called the new file.. I added some default plain text to the file to see if it was being called and it isn't.. So, now I'm back to lost.. Any thoughts?
Animal Charms : Animal jewelry that gives back
Feydakin
 
Posts: 42
Joined: Wed Jul 23, 2008 11:24 am
Location: Indiana

Postby Jim » Fri Dec 18, 2009 2:33 pm

Are your products assigned that template? Products > Edit Product layout

Is your page template using an override product template
it would look something like this
[-- Loop Products --]
[-- product SomeTemplateName --]
[-- End_Loop Products --]
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Feydakin » Fri Dec 18, 2009 6:24 pm

Hey Jim,

No, its a pretty stock product template.. The only change that I can see/recall making to it was making it call my custom moreinfo include.. I've had some offers of help, and I'm willing to pay for a working solution for this.. Im just so far out of my depth with modifying shopsite it makes me feel like most of my programming skills are worthless these days :)

I understand that I 'could' do all this in the edit image interface, but my goal is to automate as much as possible every chance I can.. Automation cuts down on mistakes.. And I feel that this is an important addition to the software for both accessibility issues and for helping with image search results..
Animal Charms : Animal jewelry that gives back
Feydakin
 
Posts: 42
Joined: Wed Jul 23, 2008 11:24 am
Location: Indiana

Postby Feydakin » Fri Dec 18, 2009 9:31 pm

Just wanted to post a HUGE thanks to Jereme at http://www.sd360.com/ for getting this sorted out for me..

For those of you that get stuck like me from time to time, spend the money and get it done right :)
Animal Charms : Animal jewelry that gives back
Feydakin
 
Posts: 42
Joined: Wed Jul 23, 2008 11:24 am
Location: Indiana

Postby Jim » Fri Dec 18, 2009 9:57 pm

So what was the problem and solution in case anyone else runs into it?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Feydakin » Fri Dec 18, 2009 10:37 pm

Basically I miss at least one Product.Graphic call when making the custom include.. Its possible I missed more.. This time of year I don't get to sleep much and code looks all fuzzy after a while..
Animal Charms : Animal jewelry that gives back
Feydakin
 
Posts: 42
Joined: Wed Jul 23, 2008 11:24 am
Location: Indiana


Return to User Forum

Who is online

Users browsing this forum: No registered users and 132 guests