CF_TEMPLATE_PATH is only going to give you the top-level page, not the page calling the UDF (unless, of course, they're the same). If you only need the directory of the top-level template, you can use expandPath. If you need to know the path of an arbitrary template calling your UDF, the only way that I know of to get it form code is to throw an exception, catch it, and look at the tag context to see where you're at. I'd imagine you can get this info from the CF services (probably the debugging service) as well, but don't know for sure, and there's obviously no version stability with that approach.
cheers, barneyb On 8/7/05, Jim Davis <[EMAIL PROTECTED]> wrote: > I've a "Paths" library which is used throughout my applications to construct > the various paths needed for a page. > > Currently when I use many of the functions I must pass in the results of > "CurrentTemplatePath()" to extract the proper path. It would be so much > simpler if the method call had some knowledge of the template which called > it (I know this breaks encapsulation... but dammit, I don't care). > > Any way to get that? The system path of the calling template? > > Is the CF_TEMPLATE_PATH CGI variable reliable enough across different HTTP > servers for example? > > Jim Davis > > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213985 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

