@@ -653,7 +653,7 @@ component
653653
654654 // Try to locate the view
655655 for ( var this LayoutPath in layoutPaths ) {
656- reReplace ( this LayoutPath , " //" , " /" , " all" );
656+ this LayoutPath = reReplace ( this LayoutPath , " //" , " /" , " all" );
657657 if ( fileExists ( expandPath ( this LayoutPath & " .cfm" ) ) ) {
658658 return this LayoutPath & " .cfm" ;
659659 }
@@ -701,11 +701,20 @@ component
701701
702702 // Declare Locations
703703 var moduleName = event .getCurrentModule ();
704- var parentModuleLayoutPath = " /#variables .appMapping #/#variables .layoutsConvention #/modules/#moduleName #/#arguments .layout #" ;
705- var parentCommonLayoutPath = " /#variables .appMapping #/#variables .layoutsConvention #/modules/#arguments .layout #" ;
704+ var parentModuleLayoutPath = reReplace (
705+ " /#variables .appMapping #/#variables .layoutsConvention #/modules/#moduleName #/#arguments .layout #" ,
706+ " //" ,
707+ " /" ,
708+ " all"
709+ );
710+ var parentCommonLayoutPath = reReplace (
711+ " /#variables .appMapping #/#variables .layoutsConvention #/modules/#arguments .layout #" ,
712+ " //" ,
713+ " /" ,
714+ " all"
715+ );
706716 var moduleLayoutPath = " #variables .modulesConfig [ moduleName ].mapping #/#variables .modulesConfig [ moduleName ].conventions .layoutsLocation #/#arguments .layout #" ;
707717
708-
709718 // Check parent view order setup
710719 if ( variables .modulesConfig [ moduleName ].layoutParentLookup ) {
711720 // We check if layout is overridden in parent first.
@@ -782,7 +791,7 @@ component
782791
783792 // Try to locate the view
784793 for ( var this ViewPath in viewPaths ) {
785- reReplace ( this ViewPath , " //" , " /" , " all" );
794+ this ViewPath = reReplace ( this ViewPath , " //" , " /" , " all" );
786795 if ( fileExists ( expandPath ( this ViewPath & " .cfm" ) ) ) {
787796 return this ViewPath & " .cfm" ;
788797 }
@@ -828,8 +837,18 @@ component
828837
829838 // Declare Locations
830839 var moduleName = arguments .module ;
831- var parentModuleViewPath = " /#variables .appMapping #/#variables .viewsConvention #/modules/#moduleName #/#arguments .view #" ;
832- var parentCommonViewPath = " /#variables .appMapping #/#variables .viewsConvention #/modules/#arguments .view #" ;
840+ var parentModuleViewPath = reReplace (
841+ " /#variables .appMapping #/#variables .viewsConvention #/modules/#moduleName #/#arguments .view #" ,
842+ " //" ,
843+ " /" ,
844+ " all"
845+ );
846+ var parentCommonViewPath = reReplace (
847+ " /#variables .appMapping #/#variables .viewsConvention #/modules/#arguments .view #" ,
848+ " //" ,
849+ " /" ,
850+ " all"
851+ );
833852 var moduleViewPath = " #variables .modulesConfig [ moduleName ].mapping #/#variables .modulesConfig [ moduleName ].conventions .viewsLocation #/#arguments .view #" ;
834853
835854 // Check parent view order setup
0 commit comments