<g:layoutHead /> code example
Example 1:
<!DOCTYPE html>
<html>
<head>
<title>I am a test page</title>
<style>
#header {background-color:#ffe0e0;text-align: center;}
#footer {background-color:#e0e0ff;text-align: center;}
</style>
<meta name="layout" content="test"/>
<link rel="stylesheet" href="/sample/static/css/main.css" type="text/css">
</head>
<body>
<div id="header">HEADER</div>
<p>The quick brown fox jumps over the lazy dog.</p>
<div id="footer">FOOTER</div>
</body>
</html>
Example 2:
<p>The quick brown fox jumps over the lazy dog.</p>
Example 3:
<!DOCTYPE html>
<html>
<head>
<title><g:layoutTitle default="Grails"/></title>
<style>
#header {background-color:#ffe0e0;text-align: center;}
#footer {background-color:#e0e0ff;text-align: center;}
</style>
<g:layoutHead/>
</head>
<body>
<div id="header">HEADER</div>
<g:layoutBody/>
<div id="footer">FOOTER</div>
</body>
</html>
Example 4:
<g:layoutBody/>
Example 5:
<meta name="layout" content="test"/>
<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
Example 6:
<g:layoutHead/>
Example 7:
<title>I am a test page</title>
Example 8:
<title><g:layoutTitle default="Grails"/></title>
Example 9:
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="test"/>
<title>I am a test page</title>
<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
</head>
<body>
<p>The quick brown fox jumps over the lazy dog.</p>
</body>
</html>