public Object layout(Map model, String templateName, boolean inheritModel) throws IOException, ClassNotFoundException {
        Map submodel = inheritModel ? forkModel(model) : model;
        URL resource = engine.resolveTemplate(templateName);
        engine.createTypeCheckedModelTemplate(resource, modelTypes).make(submodel).writeTo(out);
        return this;
    }
public Object layout ( Map model , String templateName , boolean inheritModel ) throws IOException , ClassNotFoundException { Map submodel = inheritModel ? forkModel ( model ) : model ; URL resource = engine . resolveTemplate ( templateName ) ; engine . createTypeCheckedModelTemplate ( resource , modelTypes ) . make ( submodel ) . writeTo ( out ) ; return this ; }
Imports a template and renders it using the specified model, allowing fine grained composition of templates and
layouting. This works similarily to a template include but allows a distinct model to be used. If the layout
inherits from the parent model, a new model is created, with the values from the parent model, eventually
overridden with those provided specifically for this layout.

@param model        model to be passed to the template
@param templateName the name of the template to be used as a layout
@param inheritModel a boolean indicating if we should inherit the parent model
@return this template instance
@throws IOException
@throws ClassNotFoundException