|
|
In lot of gsp examples I have seen layouts use "<g:layoutHead>" and <g:layoutBody>" is it possible to pick different parts of the content in my layout?
here is what I would like to do.. is this possible?
define a layout.. grails-app/views/layouts/page-layout-1.gsp
<html lang="en" class="no-js"> <head>
</head> <body> <div class="page"> <div class="pheader"> <g:layout element="pheader"/> </div> <div class="pmenu"> <g:layout element="pmenu" /> </div> <div class="body-content"> <g:layout element="body-content" /> </div> <div class="pfooter"> <g:layout element="pfooter" /> </div> </div> </body> </html>
and the view as follows
<html> <head> <meta name='layout' content='page-layout-1' /> </head> <html> <pheader> the content should go into pheader div </pheader> <pmenu> the content should go into pmenu div </pmenu> <body-content> this should go into body-content div </body-content> </html>
wondering if there are any approaches in gsp that would enable us to do this?
Thanks
-Vineel
|