html helper question: Is html helper only availabl...
# box-products
w
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
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
yea we inject it to the handler
w
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….