Move layout to template