http://coldfusion.com logo
#cfml-general
Title
# cfml-general
s

Simone

02/16/2022, 4:53 PM
Copy code
how can i use cf_mycustom name="whatever" in cfscript, don't see any example
c

cfvonner

02/16/2022, 4:59 PM
If you're referring to using custom tags, why would you need to use a custom tag inside of script?
r

rstewart

02/16/2022, 4:59 PM
Copy code
cf_mytag(attribute = 'value', ...);
should get you there…
s

Simone

02/16/2022, 5:00 PM
because its written in a function and i have to use it
and function is in cfc
r

rstewart

02/16/2022, 5:03 PM
and I believe this will work if it is a custom tag that deals with opening and closing tags:
Copy code
cf_mytag(attribute = 'value'...) {
...
}
… but I am not entirely sure about that.
a

Adam Cameron

02/16/2022, 5:05 PM
"Oddly" (not really), the very first link when one googles "cfml calling custom tags in cfscript" gives the answer. https://stackoverflow.com/questions/9215424/can-i-call-a-custom-tag-in-cfscript
And the second result is the Adobe documentation on the subject. https://helpx.adobe.com/coldfusion/cfml-reference/script-supported-tags-and-functions.html It falls short of actually giving you the answer in the result summary, but does - very clearly say - "You can invoke a custom tag in ColdFusion using two methods and both of them are supported for CFSCRIPT block"
💯 2