maybe I am just asking google & co. the wrong questions but this is what I want to accomplish:
I have a GSP template with a nested template within. The outer one has access to the members of a domain class instance. Instead of passing all the domain member like
<g:render template="/image/alternativeTemplate" model="${[member1: member1, member2: member2]}"/>
or using the iterator like
<g:render template="/image/alternativeTemplate" model="${[it: it]}"/>
i would like to do simply use outer GSP's model in the inner one.
Am I missing something?
Greetings, smon
To expose the entire model to a template for rendering use pageScope.variables
such as:
<g:render template="/some/template" model="${pageScope.variables}"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With