[thelist] A Question of Relative Paths

Casey Crookston casey at thecrookstons.com
Mon Mar 14 09:52:17 CST 2005

I'm using a content editor tool to allow clients to update their own
content.  It works pretty slick, except when it comes to images.  Here's the
file and directory layout:

in the "inetpub/wwwroot/fubar_client" root directory:

> default.aspx
> template.apsx
> images (folder)
> update (folder)
>> update/text_editor.aspx
>> update/conent (folder)
>>>update/content/contact.ascx etc.

The file "template.aspx" calls content out of update/content based on the
page the user has requested.  With the file "update/content/about.ascx" all
of the image paths are simply <img src="images/a.jpg"> because, despite the
file being located in the "update/content" folder, it is being called from
the root folder.

The trouble is, when the same "update/content/about.ascx" file is being
called from with the text editor at "update/text_editor.aspx" then the image
path is no longer valid.  I'm struggling with how best to solve this
problem.  I NEED the text_editor.aspx file to be in a separate folder so I
can force a login. No matter where the "images" directory is located, the
path will be different from the root directory and the update directory.

I seem to remember at some point hearing that it is possible to assign a
root directory for relative file paths within the head of a file.  Is this
true,, and if so, how?  Or is there some other way to solve this silly



More information about the thelist mailing list