Image Description field in BB- templates

Questions and answers about ShopSite Custom Templates

Image Description field in BB- templates

Postby psldesigns » Wed Apr 22, 2015 10:48 am

I'm wondering what the "Description" field is used for in the BB-templates. Specifically:

Page Banner Graphic Description
Page Link Graphic Description
Product Image Description
More Information Page Image Description

I thought these would be for alt tags or img src title, but it isn't showing up anywhere when I do a view source. I checked with Lexiconn and mentioned it seems to be used differently in different templates. Can you please advise?

Thanks!
psldesigns
 
Posts: 116
Joined: Wed Aug 16, 2006 7:06 pm
Location: Michigan

Re: Image Description field in BB- templates

Postby loren_d_c » Wed Apr 22, 2015 2:14 pm

Well, it depends on how the template calls out images, but normally this will only be used as the alt parameter value for the img src. I have a store using a BB theme (Familiar) and I checked and it seems the Description works (is put in the alt value) at least for the Product Image and the More Info Page Image.

-Loren
loren_d_c
 
Posts: 2569
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Image Description field in BB- templates

Postby psldesigns » Wed Apr 22, 2015 3:11 pm

I'm using the BB-Trace theme and it doesn't seem to be doing anything with it for the page thumbnails - "link graphic". I have added text in the description field for the following URL:

http://jandemo.janicesinvites.com/index.html , the thumbnail for the "Baby" category (a page)

View source doesn't show any alt tag ... does show a title that is the name of the page.

here is the code for the link graphic in the original BB-trace page template:
Code: Select all
[--DEFINE LINK_TO_PAGE--][-- VAR.LinkCount INC --][-- IF PAGE.LinkName --][-- VAR.SingleLinkName PAGE.LinkName --][-- ELSE --][-- VAR.SingleLinkName PAGE.Name --][-- END_IF --]<div class="item item[-- VAR.LinkCount --][-- IF PAGE.TextWrap "Off" --] nowrap[-- END_IF --]">[-- IF PAGE.LinkGraphic --]<a class="bb-lkimg" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" title="[-- VAR.SingleLinkName --]">[-- PAGE.LinkGraphic SRC_ONLY --]</a>[-- IF PAGE.LinkName --]<a class="bb-lknme" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" title="[-- VAR.SingleLinkName --]">[-- PAGE.LinkName --]</a>[-- END_IF --][-- ELSE_IF PAGE.LinkName --]<a class="bb-lknme" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" title="[-- VAR.SingleLinkName --]">[-- PAGE.LinkName --]</a>[-- ELSE --]<a class="bb-lknme" href="[-- OUTPUT_DIRECTORY_URL --]/[-- PAGE.FileName --]" title="[-- VAR.SingleLinkName --]">[-- PAGE.Name REMOVE_HTML --]</a>[-- END_IF --][-- IF PAGE.LinkText --]<span>[-- PAGE.LinkText --]</span>[-- END_IF --]</div>[--END_DEFINE LINK_TO_PAGE--]


Thanks!
psldesigns
 
Posts: 116
Joined: Wed Aug 16, 2006 7:06 pm
Location: Michigan

Re: Image Description field in BB- templates

Postby loren_d_c » Wed Apr 22, 2015 3:19 pm

I would guess that the [-- PAGE.LinkGraphic SRC_ONLY --] doesn't use the Description. You can try without the SRC_ONLY and see what happens.

-Loren
loren_d_c
 
Posts: 2569
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Image Description field in BB- templates

Postby kevin » Wed Apr 22, 2015 7:56 pm

I was wondering the same thing. I use the Familiar theme. Alt description works on products. But, when I add text to the description of the link graphic it doesn't display on my category pages (pages assigned to a certain page). How can I get the alt description to display on these?
kevin
 
Posts: 11
Joined: Thu Apr 17, 2014 1:10 pm

Re: Image Description field in BB- templates

Postby Jim » Thu Apr 23, 2015 10:16 am

The code used to display the links is quite complicated in most of the themes. Here is the link code for the BB.sst page template used by the Familiar theme
Code: Select all
[--DEFINE LINK_TO_PAGE--]
[-- VAR.LinkCount INC --]
[-- IF PAGE.LinkName --]
    [-- VAR.SingleLinkName PAGE.LinkName --]
[-- ELSE --]
    [-- VAR.SingleLinkName PAGE.Name --]
[-- END_IF --]<div class="item item
[-- VAR.LinkCount --]
[-- IF PAGE.TextWrap "Off" --] nowrap
[-- END_IF --]">
[-- IF PAGE.LinkGraphic --]<a class="bb-lkimg" href="
    [-- OUTPUT_DIRECTORY_URL --]/
    [-- PAGE.FileName --]" title="
    [-- VAR.SingleLinkName --]">
    [-- PAGE.LinkGraphic SRC_ONLY --]</a>
    [-- IF PAGE.LinkName --]<a class="bb-lknme" href="
        [-- OUTPUT_DIRECTORY_URL --]/
        [-- PAGE.FileName --]" title="
        [-- VAR.SingleLinkName --]">
        [-- PAGE.LinkName --]</a>
    [-- END_IF --]
[-- ELSE_IF PAGE.LinkName --]<a class="bb-lknme" href="
    [-- OUTPUT_DIRECTORY_URL --]/
    [-- PAGE.FileName --]" title="
    [-- VAR.SingleLinkName --]">
    [-- PAGE.LinkName --]</a>
[-- ELSE --]<a class="bb-lknme" href="
    [-- OUTPUT_DIRECTORY_URL --]/
    [-- PAGE.FileName --]" title="
    [-- VAR.SingleLinkName --]">
    [-- PAGE.Name REMOVE_HTML --]</a>
[-- END_IF --]
[-- IF PAGE.LinkText --]<span>
    [-- PAGE.LinkText --]</span>
[-- END_IF --]</div>
[--END_DEFINE LINK_TO_PAGE--]

This code outputs just the image for the link in this line [-- PAGE.LinkGraphic SRC_ONLY --]</a> The SRC_ONLY eliminates anything but the image url, no height, width, alt text, border etc is output.
If you change the tag [-- PAGE.LinkGraphic SRC_ONLY --] and remove the SRC_ONLY part so it is [-- PAGE.LinkGraphic --] the template will out put the alt text and other attributes configured for the image for example
Code: Select all
 [-- PAGE.LinkGraphic SRC_ONLY --]  outputs
img src="http://blister.shopsite.com/12sp1/html/qa121/media/sample-46x50.gif">

and
Code: Select all
  [-- PAGE.LinkGraphic  --] outputs
<img  src="http://blister.shopsite.com/12sp1/html/qa121/media/sample-46x50.gif" alt="JIM SAMPLE IMAGE" width="46" height="50" vspace="3" hspace="3" border="0">
The additional attributes could cause problems with the way links display on a page so this is why the template uses the SRC_ONLY option for the Page.LinkGraphic image output.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Image Description field in BB- templates

Postby psldesigns » Thu Apr 23, 2015 11:59 am

Because of your warning about "The additional attributes could cause problems with the way links display on a page so this is why the template uses the SRC_ONLY option for the Page.LinkGraphic image output" I don't want to chance using it -- guessing the width and height attributes may cause problems with mobile. But I would like to include the Description as the alt tag. So I could have this:

Code: Select all
<img src="media/[-- IMAGE PAGE.LinkGraphic --]" alt="[-- PAGE.LinkGraphicDesc --]">


Except that doesn't include the image size ... meaning which directory it uses (ss_size1, ss_size2, ss_size3). Is there a tag for the image size directory?
psldesigns
 
Posts: 116
Joined: Wed Aug 16, 2006 7:06 pm
Location: Michigan

Re: Image Description field in BB- templates

Postby psldesigns » Thu Apr 23, 2015 1:41 pm

Lexiconn figured it out for me ... this tag:

Code: Select all
[-- PAGE.LinkGraphic ONLY_ALT_TAG --]


gives me this:

Code: Select all
<img src="http://jandemo.janicesinvites.com/media/categories/baby.jpg" alt="Baby Announcements, Shower Invites and other stationery">


Which is exactly what is needed ... in this particular case, it is the "original" size so no size directory was necessary.

Many of these tags aren't listed on the tag list in ShopSite and would be nice if they were there. Unless I'm just not seeing them. :O)
psldesigns
 
Posts: 116
Joined: Wed Aug 16, 2006 7:06 pm
Location: Michigan


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 36 guests

cron