> I'm using CFINCLUDE to bring in a file from another directory
> into my current file.  The problem is that the file being
> included contains references to images in other folders, via
> relative paths.  Thus, when I load the main page into a
> browser, the images do not show up.
>
> Is there a way around this, short of using absolute paths to
> the image files?

Unless you use CF variables to help write the paths, no, that's just the way
relative paths work in HTML. They're dependent on the relative path from the
file with the URL to the file the browser's supposed to fetch. If you
CFINCLUDE one file within another, the browser doesn't know about the
original location of the CFINCLUDEd file, it just knows about the URL that
it requested to get the page in the first place, and will use that as the
basis for any relative paths within HTML.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to