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

wil-shiftinsert

04/15/2022, 4:01 PM
html helper question: Is html helper only available by default (as
html.something()
) in a coldbox view? If I try to use it in my handler I get the message
html
is not available, unless I inject it in the handler. The manual says
There is no special setup needed to use it in a ColdBox application, it’s already baked in. Just reference the object by the
html
prefix and call the desired function within any layout or view.
So I was wondering if I am doing something wrong.
c

cfvonner

04/15/2022, 4:03 PM
Seems like it's behaving exactly as advertised:
within any layout or view
. It's probably designed as a "view helper", so to me it makes sense it's not available in a handler without injecting it yourself.
p

Patrick

04/15/2022, 4:03 PM
yea we inject it to the handler
w

wil-shiftinsert

04/15/2022, 4:04 PM
makes sense, just couldn’t find it in the manual. Maybe I should read two lines extra 🙂
no special setup, baked it all suggest you don’t have to do anything special. But yes, it is in the next sentence… Thanks guys, never used it this way. Working on api’s most of the time….
2 Views