Im jumping into the middle also, but have to tried adding a mapping in the 
CFadministrator?

I had to use a path for some CFCINCLUDES that went 3 or 4 folders deep, and 
it works great!



At 08:51 AM 9/25/2001 -0700, you wrote:
>See below...
>
>----- Original Message -----
>From: "Jeffry Houser" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Tuesday, September 25, 2001 11:30 AM
>Subject: Re: Absolute Path Usage
>
>
> >   I didn't see the original post, so I'm jumping in the middle.
>..
> >   The way I do this is by setting a variable ( Either to the local scope
>or
> > the request scope ) in the application.cfm called DirLevel:
> >
> > Root:             Dirlevel = ""
> >   Sub1            Direvel = "../"
> >    SubSub1:    Dirlevel = "../../"
> >   Sub2            Dirlevel = "../
> >
> >
> >   When you create your include, make all the paths relative to the root
> > directory and add dirlevel in there.
> >
> > <A HREF="#dirlevel#index.cfm">Home</A>
> > <A HREF="#dirlevel#sub1/page1.cfm">Page 1</A>
> > etc.. etc..
> >
> >   This makes it easy, and I do it all the time.
> >   One potential problem is that you'll need different application.cfm for
> > each directory.
>
>This technique may be useful in some cases, although I'm not sure that it's
>worth it.  I'll probably just stick to hardcoding the ../../  etc levels in
>each CFINCLUDE statement.
>Thanks for the tip!
>
> >
> > >I have tried a variety of absolute paths and find none that work.  If
>anyone
> > >can shed some light on this...my host shares the CF server so asking them
>to
> > >configure a mapping for "/" is not going to happen since it would only
>work
> > >for my domain and not for all the other domains they host.
> >
> >    You can always get to the exact root directory (I.E. www.mysite.com/ )
> > by using the slash.  So the code I wrote above could easily be re-written
>like:
> >
> > <A HREF="/index.cfm">Home</A>
> > <A HREF="/sub1/page1.cfm">Page 1</A>
> >
> >   And the browser sees the '/' and automatically adds it to the end of the
> > url, such as www.mysite.com/index.cfm for the first link.  Try it; It
> > works.  However, if the root directory of your application is not the root
> > directory of your server, that won't work.
>
>It may work for <A HREF> but not for <CFINCLUDE template=> tag.  That is the
>whole point of my discussion.  CFINCLUDE is very picky...it appears it ONLY
>sees relative paths or paths specified in the server mapping file.  That's
>IT!  How I wish it recognized "/" as the web root, meaning the placeholder
>or representative location for http://www.mydomain.com/.
>
>Bruce
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to