I recently have been working with a nice Twitter Bootstrap based theme with the intention of Grailsifying it.
Like most of these canned themes, there are plenty of excellent sample pages showing off a wide variety of UI features based on Twitter Bootstrap, jQuery, and jQuery UI. However, as static HTML pages, there's a tremendous amount of markup duplications; i.e. most of the <head> content repeats on every page, the markup for the main menu repeats, the footer repeats, etc.
After changing the pages to GSPs and fixing up links to reference URLMappings, everything was still working fine.
My next task was to abstract out <head> section stuff into the main layout. Again, all pages worked as before.
I tried moving the menu markup into a template, but got the exact same behavior.
I believe all of what I'm seeing is related to the problem discussed in this thread (including a sample test snippet):
Besides, as a matter of principle, I think Grails templates and layout should not levy requirements for external code changes in order for the template/layout to work. In other words, Twitter Bootstrap code should not have to be modified to get a Grails template (or layout) to render and behave the same way the markup behaved before it was encapsulated in the template (or layout).
I'm hoping against all hope that I've missed something obvious in Grails 2.1.2 and 2.2.0RC4 template/layout configuration that will make this all work out. Otherwise, I'm stuck with massive DRY violations from all the copy/pasted HTML markup on the pages.
I warmly welcome any guidance on the subject. Thanks in advance.