문제

I want to apply my layouts/main.gsp layout to the user/login page. my main.gsp has reference to other css and refernces to the templates :

</head>

<body>

<g:render template = "templates/headerTop" contextPath = "/"></g:render>

<g:render template = "templates/menuHeader" contextPath = "/"></g:render>
<g:layoutBody/>
<g:render template="templates/footer" contextPath = "/"></g:render>

</body>

But when i run the application and go to login click it says it can not find the template path. I understand that since login is in 'user' folder so it is not able to search the path. Question is : how to apply layout to my login page.

도움이 되었습니까?

해결책

You need to specify absolute path to your templates:

   <g:render template = "/templates/headerTop" contextPath = "/"></g:render>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top