views:

175

answers:

2

I had a grails 1.1 app working where keyword and description meta tags were dynamically generated. There was a change in how that works in 1.2, but I cannot found good documentation. I've tried numerous ways to make it work. No matter what I do the resultant html gets something like

<meta name="keywords"/>" />

instead of the actual keywords. The extra tags there are not a typo on my part. So it also creates a bug in my rendered html.

A: 

I have had problems in 1.2 with meta tags dynamically generates and found that the problems happened when the quote was followed by a $. If I put a space between the quote and the $ it worked like

<meta name="keywords" value=" ${keywords}"/>

May or may not be your problem...

mbrevoort
+1  A: 

In Grails 1.2, there's a performance optimized integration to Sitemesh. You can use the old implementation if you specify grails.views.gsp.sitemesh.preprocess = false in Config.groovy. There are several issues in Grails JIRA related to meta tags :

Some of them will be fixed in Grails 1.2.1 .

FlareCoder
Thanks for the pointers. Part of what I was wondering was whether the syntax has changed as well if you want the optimized performance.
Andrew