Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [minesite] Adding a different image before each category in the home page

Quote Reply
Re: [minesite] Adding a different image before each category in the home page In reply to
Hi.

This is what got it going:

sub {
my $tags = shift;
my $file = $DB->table('Category')->file_info('Image', $tags->{ID}) or return "ID $tags->{ID} does not have a file attached.";
return $file->File_RelativePath();
}

However, in template

<img src="<%build_images_url%>/default<%cat_images%>" border=0>

the image url is fine as :
....../images/default/x/x-imagename.gif

if i use the regular

<img src="<%build_images_url%>/default/<%cat_images%>" border=0>

then in the image url on page (visitor side) there is an extra / like:

..../images/default//x/x-imagename.gif

though the images are properly displayed in both cases... Is it because of the leading slash being added to file_info() by default?

But Yes the images uploaded thru Admin are displayed correctly though.
Thanks for pointing me to the thread. As for speed, with static mode is what i prefer over dynamic one, that should not cause any big difference or will it? It could perhaps be made a bit faster if the height and width attributes of the image could also be defined...

Thanks
Anup

Last edited by:

anup123: Aug 14, 2004, 11:02 PM
Subject Author Views Date
Thread Adding a different image before each category in the home page megaline 5266 Jun 11, 2004, 6:25 PM
Thread Re: [megaline] Adding a different image before each category in the home page
afinlr 5110 Jun 14, 2004, 5:44 PM
Thread Re: [afinlr] Adding a different image before each category in the home page
anup123 5070 Aug 14, 2004, 5:40 PM
Thread Re: [anup123] Adding a different image before each category in the home page
minesite 5104 Aug 14, 2004, 6:03 PM
Thread Re: [minesite] Adding a different image before each category in the home page
anup123 5071 Aug 14, 2004, 10:51 PM
Thread Re: [anup123] Adding a different image before each category in the home page
minesite 5099 Aug 14, 2004, 11:12 PM
Thread Re: [minesite] Adding a different image before each category in the home page
Jag 4959 Oct 14, 2004, 7:03 PM
Thread Re: [Jag] Adding a different image before each category in the home page
HyperTherm 4949 Oct 14, 2004, 7:21 PM
Post Re: [HyperTherm] Adding a different image before each category in the home page
Jag 4958 Oct 14, 2004, 7:27 PM
Thread Re: [megaline] Adding a different image before each category in the home page
ryel01 5049 Aug 15, 2004, 1:54 AM
Thread Re: [ryel01] Adding a different image before each category in the home page
anup123 5069 Aug 15, 2004, 2:18 AM
Thread Re: [anup123] Adding a different image before each category in the home page
Andy 5102 Aug 15, 2004, 3:04 AM
Thread Re: [Andy] Adding a different image before each category in the home page
anup123 5093 Aug 15, 2004, 4:49 AM
Post Re: [anup123] Adding a different image before each category in the home page
Andy 5067 Aug 16, 2004, 12:44 AM