>The value of GetBaseTemplatePath() should exhibit the behavior you're >saying you're getting from GetCurrentTemplatePath() when called from >within Application.cfm...
Yes, and the "base template" is the one that you see in the URL, correct? >However... getCurrentTemplatePath() will provide varried behavior when >it is called within a function -- when called within a function >created using <cffunction> it returns the path to the template >containing the cffunction tag. When called within a function created >using <cfscript> it returns the template in which the function is >called. Personally I think this is insane, but that's the way it is -- >I suspect it's intended for CFC's. >You aren't by any chance creating a function which called >getCurrentTemplatePath() and then calling that function? Maybe in a >CFC? Well, I'm quite glad that you knew this quirk, and replied to my message! The UDF containing the call to getCurrentTemplatePath() is indeed in cfscript (in my Application.cfm), and that UDF is indeed being called externally (sometimes). I guess that's why it was reporting the caller of the UDF instead of the caller to getCurrentTemplatePath(). I have to agree that this is insane, if it's not a bug. Does this quirk still exist in CFMX7? (I'm still on 6.1.) However, you're saying if I use <cffunction> for the function that calls getCurrentTemplatePath(), then it'll behave as desired? That's a pretty good workaround until getCurrentTemplatePath() starts to work properly in all contexts. >No, expandPath() isn't, has never been and will never be a reliable >means of determining the absolute path to any file Application.cfm or >otherwise, because it expands the path from the base template -- imo >pretty much useless. Got it! Thanks, Jamie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202486 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

