Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Re: Images on templates ?

Quote Reply
Re: Images on templates ? In reply to
Uh NO...The build_root_path is the ABSOLUTE path and thus the images would never show up.

If you want to use a VIRTUAL PATH, then you could use something like:

Code:

$build_image_path = "/virtual/path/to/images";


Then create a global variable in the %globals hash in the site_html_templates.pl file:

Code:

build_image_path => $build_image_path


Then in the template files, use:

Code:

<img src="<%build_image_path%>/image.gif" alt="" width="" height="" border="">


OF COURSE, the easier thing to do is create additional IMAGE variables in the links.cfg file, like the following:

Code:

$new_image = 'img src="$build_image_path/new.gif" alt="new" width="" height="" border=""';


Then create global variables in the %globals section in the site_html_templates.pl file:

Code:

new_img => $new_img


Then simply use:

Code:

<%new_img%>


GOT it? Tongue

Regards,

Eliot Lee
Subject Author Views Date
Thread Images on templates ? adriana 3417 Dec 20, 2000, 1:47 PM
Post Re: Images on templates ?
Thomas. 3304 Dec 20, 2000, 1:55 PM
Thread Re: Images on templates ?
Stealth 3321 Dec 20, 2000, 3:13 PM
Post Re: Images on templates ?
jude 3301 Dec 21, 2000, 4:06 PM
Thread Re: Images on templates ?
doororjon 3241 Jan 22, 2001, 7:37 PM
Thread Re: Images on templates ?
Stealth 3230 Jan 22, 2001, 7:44 PM
Thread Re: Images on templates ?
doororjon 3242 Jan 22, 2001, 8:31 PM
Thread Re: Images on templates ?
Stealth 3246 Jan 22, 2001, 9:34 PM
Thread Re: Images on templates ?
doororjon 3229 Jan 23, 2001, 8:30 PM
Post Re: Images on templates ?
Stealth 3251 Jan 23, 2001, 8:52 PM