0

I am trying to include grails render tag inside assets image title, but getting an error like

<asset:image src="layout/bell.png" title='<g:render template="/srcdir/incompletePage" model="[dataObj: names]"/>' />



org.grails.taglib.GrailsTagException: [grails-app\views\abc.gsp:302] Attribute value quote wasn't closed (src="layout/bell.png" title='<g:render template="/srcdir/incompletePage" model="[dataObj: names]")

is there any other way to add the render template?

BIdesi
  • 341
  • 2
  • 12

1 Answers1

2

Although it's not pretty, you should be able to achieve what you want by using the tag as a method call:

<asset:image src="layout/bell.png" title='${g.render( template:"/srcdir/incompletePage", model:"[dataObj: names]"}' />
Taras Kohut
  • 2,505
  • 3
  • 18
  • 42