I have a partial template that I include in my own main.gsp.
This partial content will be slightly different for each controller / page on the site. Therefore, for each directory of representation I will have a separate one _headerDetails.gsp.
This works great except for the default application index.gsp. When I include the directory _headerDetails.gspunder the root view, I get the following error:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Template not found for name [headerDetails] and path [//_headerDetails.gsp]
Does grails allow partial files to be allowed in the root directory?
Main.gsp
<html>
<head>
<g:layoutTitle/>
<r:layoutResources/>
<link href="${resource(dir: 'css', file: 'style.css')}" type="text/css" rel="stylesheet">
</head>
<body class="home">
<div id="wrapper">
<div id="page_top"></div>
<div id="content">
<g:render template="/common/header" />
<g:render template="headerDetails" />
<br class="clear" />
<g:layoutBody/>
<br class="clear" />
</div>
<div id="page_bottom"></div>
<g:render template="/common/footer" />
</div>
<r:layoutResources/>
</body>
</html>
source
share