开发者

In Grails template namespace how do you use a template that is in another directory

开发者 https://www.devze.com 2022-12-14 21:09 出处:网络
Say I have a template called /sample/_mytemplate.gsp. If I want to call this template from the same directory I can use

Say I have a template called /sample/_mytemplate.gsp.

If I want to call this template from the same directory I can use

Howeve开发者_Python百科r, what if I am in another directory. Then what do I do?

Say I'm in the view /sample2/mypage.gsp how do I call it?


In Grails 1.3.7 the following syntax

<tmpl:/sample/mytemplate />

works.


<g:render template="/sample/mytemplate" /> 

should do it.

0

精彩评论

暂无评论...
验证码 换一张
取 消