Where do you put cfimport

My cfimport works on the page, but I tried moving it to onRequestStart, and that didn't work. Then I tried to put it in cfinclude one folder down, and that didn't work. Should cfimport be on the page itself?

+3
source share
1 answer

Yes, tags can only be used on the page where it is used cfimport; from the documentation :

The cfimport tag must be on a page that uses imported tags. For example, if you use the cfimport tag on a page that you include with the cfinclude call, you cannot use the imported tags on the page with the cfinclude tag. Similarly, if there is a cfimport tag on the Application.cfm page, the imported tags are available only on the Application.cfm page, and not on other pages of the application. ColdFusion does not generate errors in these situations, but imported tags do not start.

+6
source

Source: https://habr.com/ru/post/1711174/


All Articles