Gossamer Forum
Home : Products : Gossamer Links : Discussions :

subcategory.html & <%Image%>

Quote Reply
subcategory.html & <%Image%>
Hi.
As in subcategory.html

<%-- This is only useful if you have added an Image column to your category table --%>
<%if Image%>
<td width=30 align=center valign=top>
<img src="<%build_images_url%>/default/<%Image%>" border=0></td>
<%else%>
<td width=25>&nbsp;</td>
<%endif%>

Added a column to Category (Image) and Edited a Category to upload the image.
User side image does not show as the image uploaded is not where the path is specified....

How does this really get working?

TIA
Anup
Quote Reply
Re: [anup123] subcategory.html & <%Image%> In reply to
Hi You need to upload the image via FTP and make sure /default/ , points to the correct folder,

If you want to use the GT upload feature thats another issue.

This should help.
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=269884;#269884

Regards

minesite

Last edited by:

minesite: Aug 14, 2004, 4:13 PM
Quote Reply
Re: [minesite] subcategory.html & <%Image%> In reply to
Hi.

If image is ftp'd to the /images/template directory, then that <%if Image%> would fail as that requires that the column Image be added to Category Table and then in Category Edit, the Image is uploaded. (which all displays too well if viewedfrom admin end), unless of course i add the image thru Admin and then upload the original image thru ftp, so have two sets of images one with xx- prepended and one original one. ... All due to image naming issue ... travel.gif is saved as xx-travel.gif and so on, where xx is numeric... whereas the userside has a broken image as it's looking for travel.gif which is not there.

I still do not see the reason why the <%if Image%> clause is there in the Template if it does not work. Perhaps GT could correct the template. Found similar tags in "mint" template set too and missing from the other templates so it's a bit of confusion.

Never tried it with Links Table (as pdf documentation gives an example of adding Image column to Links Table and calling it as template tag but i presume it would fail there too due to xx-imagename.gif issue)

Thanks
Anup
Quote Reply
Re: [anup123] subcategory.html & <%Image%> In reply to
Hi Anup

Crazy This seems to confuse a lot of users.

You mentioned that you have a column “Image” setup so the problem might be that you are putting in the URL of the image into the Category Table text box named “Image”.
It doesn’t need the URL to the image, only the image file name “my_image.gif”.

Go to Admin > Browse > select the Category > Edit > then in the “Image” text box put in only the image name “my_image.gif”
and save.

FTP the image to the Directory specified under Admin > Setup > Paths and URL's > Other Paths and URL's

“This should be the URL where any image files used by Links SQL can be found. No trailing slash.”
build_images_url. - /mysite.com/images

Try it from your browser to make sure you have the right path and the image should show up.
i.e. http://mysite.com/images/my_image.gif
i.e. <%build_images_url%>/<%Image%>

Then edit the subcat template and change to suit your default setting as above.

<%if Image%>
<img src="<%build_images_url%>/<%Image%>" border=0>
<%else%>
No Image
<%endif%>

Load up the specified Category and the image should show up.

Regards

minesite