Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [shell] adding graphics for categories

Quote Reply
Re: [shell] adding graphics for categories In reply to
okay, this is my latest try from a post on the site. The link is dead so I don't know what info I'm missing. If my new column name in my "category" table is "Image" where does that go in the global? And if not there, where do I reference the new column name? And when he says don't put the images in a "cgi" folder does he mean any folder in admin, I have the path going to /glinks/admin/templates/images. Thanks, S


Find this solution on a opst by Alex
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=184526#184526

Add a global called image_name =>

sub {
my ($col, $id) = @_;
return $DB->table('CAtegory')->file_info($col,$id)->File_RelativePath;
}

and then in your category.html template you can put:

<img src="/images/<%image_name('Portrait',$ID)%>">

------
My comments

Where /images is the path as defined in
File Save URL in the image field
Images should not be in a cgi folder in order to be accessed

Subject Author Views Date
Thread adding graphics for categories shell 4666 Oct 13, 2006, 2:31 PM
Thread Re: [shell] adding graphics for categories
Alba 4578 Oct 14, 2006, 1:12 AM
Thread Re: [Alba] adding graphics for categories
shell 4548 Oct 26, 2006, 11:20 AM
Thread Re: [shell] adding graphics for categories
shell 4551 Oct 27, 2006, 2:48 PM
Post Re: [shell] adding graphics for categories
shell 4514 Oct 27, 2006, 3:44 PM