Search code examples
grailsgroovytaglibgsp

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"
  //Again with "datastructure2"
</g:each>

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


Solution

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