Grails uses Sitemesh as the layout and decoration framework. Layouts are defined in the
grails-app/views/layouts directory. There are several conventions Grails uses to determine which layout file must be applied. We can set a default layout for our application by setting the property
grails-app/conf/Config.groovy. The value of the property maps to the filename of the layout. For example if we set the value to
main then Grails will use
Another way is to create a layout with the name
application.gsp and save it in
grails-app/views/layouts. Grails will use this layout if the layout cannot be determined in another way.