开发者

GSP include - with parameters -within g:each?

I have some common structure that I'd like to use, and I need to nest it within a <g:each />. The semantic solution seems to be to create a taglib, but I'd rather write GSP code to construct the structure, as it's easier to read/maintain.

Essentially, I need this:

<g:each ...>
  //Somehow include a GSP that takes parameter "datastructure1"
  //Agai开发者_如何转开发n with "datastructure2"
</g:each>

A GSP include takes params, but it's not nestable in a <g:each />. What am I looking for?


<g:include> works as you need it to. Try again.


You can call a taglib, then in the taglib function: render a template. There's an example here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜