http://coldfusion.com logo
#box-products
Title
# box-products
a

aliaspooryorik

05/11/2022, 10:22 AM
Was just reading the ACF2021 deprecated list and noticed
GetTemplatePath
in there which currently in ColdBox https://github.com/ColdBox/coldbox-platform/blob/development/system/web/config/ApplicationLoader.cfc#L177 expect it works just fine but just flagging in case it's useful 🙂 `https://helpx.adobe.com/coldfusion/deprecated-features.html
b

bdw429s

05/11/2022, 1:47 PM
Wow, that's interesting-- I wonder why they would deprecate that function? I'm not aware of any replacement that does the same thing and it's very important to allow a framework to detect what folder it's executing in.
@Mark Takata (Adobe) Is there an explanation for this one?
a

aliaspooryorik

05/11/2022, 1:50 PM
I don't think I've ever used
getTemplatePath
can you use
getBaseTemplatePath
instead?
or
getcurrenttemplatepath
?
b

bdw429s

05/11/2022, 1:52 PM
Man, the descriptions for these suck on cfdocs, lol
I can't tell the difference between any of them
Gets the absolute server file system path of the requested CFML file.
Returns the filepath of the base template in this request
Gets the absolute server file system path of the file that calls this function.
It's like it's saying the same thing 3 times using different words
a

aliaspooryorik

05/11/2022, 1:53 PM
🙂 Off the top of my head
getBaseTemplatePath
is the path to the Application.cfc.
getcurrenttemplatepath
is the current script path where the function is called from ,
b

bdw429s

05/11/2022, 1:55 PM
Then it sounds like maybe the "current" one is the one we need to switch to. I'll be honest, I don't use these often and I didn't even realize there was three versions of it, lol
fingers crossed 1
5 Views