On Tue, 12 Dec 2000, Colin Chalmers wrote:

> Hi,
> 
> We've been having some trouble with the path to images. We were using
> absolute paths but found this a bit restrictive.
> I looked into earlier messages and found something called
> "$image.setImage()". Unfortunately I can't find any other info related to
> this.
> 
> Do I need to set it somewhere or does it work "automatically". How does
> Turbine know where the images directory is?

There's a little class called ContentURI, an instance of which is
placed in the Velocity/WM context for you that can be used
in your templates. If you had your images in the top level
directory of your webapp and wanted to access turbine.gif then
you would use the ContentURI class like this:

<img src="$content.getURI("images/turbine.gif")">

jvz.



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to