That's working almost properly... I don't know how versions of cf-unix work with 
regard to templates stored in different root directories, i.e. /home/blah/blah vs. 
/spaw-cf/blah/blah ... but what the tag does is attempt to get a relative path from 
the current template directory to the target template (or directory)... so... say for 
instance, I had these 2 templates: 

c:/inetpub/wwwroot/mysite/mytemplate.cfm 
c:/inetpub/wwwroot/temp.cfm

If i put #getRelative('c:/inetpub/wwwroot/temp.cfm')# in mytemplate.cfm the resulting 
value would be "../temp.cfm". But if it's not on the same drive (or in the case of 
unix the same root directory) it's gonna try and go all the way back to the root, for 
instance, #getRelative('d:/temp.cfm')# is gonna return ../../../d:/temp.cfm ... on 
Windows this doesn't work -- there's no way to create and use a relative path to a 
file on another drive (that I know of) ... Not sure how Unix handles it. 

What I don't know off the top of my head is why it's creating 13 instances of ../ 
instead of 9 instances of ../ which is the number of directories in the 
getcurrenttemplatepath() string... Probably it's adding an extra array entry for the 
leading slash (if not the trailing slash), so if unix allows a relative path to a 
different root directory, then fixing that will make it work. Let me know if you're 
able to get it to work (and how) and I'll update the function for the bug fix. :) 

hth and thanks, 

Isaac 


------ Original Message ------ 
From: Mauricio Giraldo <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Aug 29, 2003 02:38 PM
Subject: Re: Multiple sites...

>I don't seem to understand the getRelative UDF:
>
>suppose the physical map path for my account is
>/home/virtual/sites/mysite/www/html/
>
>the web root map path for my account is
>/www/html/
>
>here's a sample:
>http://www.elefectoaxe.com.co/spaw/scripts/test3.cfm
>
>what am I doing wrong?
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to