Support getLayout and getTemplate