Colin Harrington

Grails: The View Layer [GUM]

by Colin on Feb.04, 2010, under Groovy-Grails

This past month, I did a presentation at the Groovy Users of Minnesota which I called Grails: The View Layer.  We took our time delving into the Groovy Server Pages, how Grails utilizes Sitemesh and some of the more obscure tags related to Sitemesh.  Currently, Grails’ Sitemesh integration is not very well understood by the community at large and I wanted to spend some time on it since Sitemesh is such a powerful part of the Framework.

I was hoping to spend some more time polishing this slide deck, but hopefully this presentation skeleton is helpful to the community as it is.  I am hoping to give this talk again at Gr8Conf in the USA this upcoming April and spend some more time creating more concrete and digestible examples.

:, , ,

7 Comments for this entry

  • Hamlet D'Arcy

    Submit to Jazoon! You’ll have a free place to stay!

  • aeischeid

    Thanks, good material. I was unaware of the pageProperty stuff, and I am sure that will come in handy. I am a little confused about the applyLayout slide (23), could you explain that a bit? any chance there was recorded audio to go with this?

  • Colin

    @aeischeid, We didn’t record the audio, but I’m going to be putting in more content with some better examples so that I can give this talk again. I hope there are some good hints in it until then. It really deserves some good concrete examples.

  • Ted Naleid

    Great presentation Colin, thanks for posting it.

    I also recently found out that there’s an undocumented g:ifPageProperty tag. Very useful for parameters that might not apply. Here’s an example that optionally includes some content in a layout a property is in the thing the template is being applied to:

    <g:ifPageProperty name=”meta.heading”>
        <h2 class=”heading”><g:pageProperty name=”meta.heading” /></h2>
    </g:ifPageProperty>

    Only included if something like this is in the page using the layout’s head:

    <meta name=”heading” content=”My Fancy Title”/>

    This also applies for the<content> tags too.

  • Colin

    Thanks Ted! g:ifPageProperty is one of the undocumented tags we talked about at GUM :-) There are a few more. I’ll try to locate them all when I do this talk again.

  • Kinsella

    Very good presentation last month. For me, it’s been awhile but I’ll have to re-read the GSP/Sitemesh stuff in ‘Grails in Action’; Just to see if there’s any other hints/gotchas that might help beef up the presentation some. Maybe you could talk a little more Grails dynamic tag libraries?

  • Bill Turner

    Great stuff, Colin! I really look forward to seeing the presentation at GR8 in the US!

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!