Allow to render template with layout that using other template engine

ref #1461 
What do you think?