get_layout function now get proper layout in nested sub pages with inherited templates