Skip to content

Commit 1e1c4f7

Browse files
committed
COLDBOX-1285
BoxLang Support
1 parent 05459b2 commit 1e1c4f7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

system/web/Renderer.cfc

+8-7
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,15 @@ component
9292
variables.viewsHelper = variables.controller.getSetting( "viewsHelper" );
9393
variables.viewCaching = variables.controller.getSetting( "viewCaching" );
9494

95-
// Verify View Helper Template extension + location
95+
// Global View Helper
9696
if ( len( variables.viewsHelper ) ) {
97-
// extension detection
98-
variables.viewsHelper = (
99-
listLast( variables.viewsHelper, "." ) eq "cfm" ? variables.viewsHelper : variables.viewsHelper & ".cfm"
100-
);
101-
// Append mapping to it.
102-
variables.viewsHelper = "/#variables.appMapping#/#variables.viewsHelper#";
97+
var viewHelperPath = "/#variables.appMapping#/#variables.viewsHelper.listFirst( "." )#";
98+
if ( fileExists( expandPath( viewHelperPath & ".cfm" ) ) ) {
99+
variables.viewsHelper = viewHelperPath & ".cfm";
100+
}
101+
if ( fileExists( expandPath( viewHelperPath & ".bxm" ) ) ) {
102+
variables.viewsHelper = viewHelperPath & ".bxm";
103+
}
103104
}
104105

105106
// Template Cache & Caching Maps

0 commit comments

Comments
 (0)