Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 1. Grails in a hurry... > Creating the domain model - Pg. 17

Creating the domain model 17 HTML will depend on what the individual tag generates. For instance, that first createLinkTo tag C will end up generating a link fragment like /qotd/css/snazzy.css. In the title block of the page, we include our QOTD title and then follow it with some chevrons ( >> ) represented by the HTML character code &raquo; , and then add the title of the target page itself B . After the rest of the head tags, we use a layoutHead call to merge the contents of the HEAD section of any target page D . This can be important for search engine opti- mization ( SEO ) techniques, where individual target pages might contain their own META tags to increase their Google-ability. Finally, we get to the body of the page. We output our common masthead div to get our Web 2.0 gradient and cute icons, and then we call <g:layoutBody> to render the BODY section of the target page E . Let's refresh our browser to see how we're doing. Figure 1.7 shows our styled page.