Colin Chalmers wrote:
> 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?

If you are using Tomcat or another Servlets 2.2 compliant Servlet
Container,
Turbine runns within a 'web application' which is contained in a
directory.

Each web application is mapped onto a 'context' inside the servers URL
namespace.

URL namespace

http://server.acme.com/foo/images/blank.gif or /foo/images/blank.gif
                       ---                      ---
                        context

servers filesystem namespace

/usr/local/tomcat/webapps/foo/images/blank.gif
 ----------------------------
  web application

To reference an image, you need to put context name into the URLs and
then
the path witin your webapp.

You can do it in a convinent way using the following in your WebMacro
template

$content.getURI("/images/blank.gif")

note that it doesn't guess the path to the 'images' directory. You need
to specify the path from your webapp root.

Hope that helps...


Rafal

                    

--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl


------------------------------------------------------------
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