How ColdFusion framework ONE making view function available in views

167 views Asked by At

I am wondering how framework one (fw1) making view() function available in views, like ColdFusion in built functions?

For example, in the below code , the view() function can be called like any ColdFusion in built functions. How fw1 making it possible?

#view(‘components/contact’)#

The function view() has been defined in /framework/one.cfc

1

There are 1 answers

2
Bernhard Döbler On

Application.cfc extends one.cfc. Every view is executed in the context of the OnRequest method and can therefore access these methods.

From the documentation

FW/1 itself consists of a single CFC: framework.one, i.e., framework/one.cfc. Your Application.cfc will extend that