Home How to Render a Grails View Without a Layout

# How to Render a Grails View Without a Layout

Travis Smith
1#
Travis Smith Published in 2017-11-30 20:24:17Z
 If you have a controller action, but don't want the view to be rendered with the default layout (in my case layout/main.gsp), is there a render option you can enter into the controller action or something similar? def comingSoon { static layout = none; //not correct, but something like this? } 
Joshua Moore
2#
Joshua Moore Reply to 2017-11-30 20:42:24Z
 Without more details it's difficult to say 100% what case you are in so I'll attempt to answer both. If you are using dynamically scaffolded views then you'll need to generate the GSPs so you can remove the 
elixir
3#
elixir Reply to 2017-11-30 20:51:46Z
 In your view file, you might see something like this  // delete this line Coming Soon ...  Remove the meta tag with the name="layout". This meta tag is the one that tells sitemesh to use the main layout
Syed Sarek
4#
Syed Sarek Reply to 2017-12-03 06:43:02Z
 You can remove  to vanish exists layout. Or you may customize layout by edit that main.gsp page in your-project\grails-app\views\layouts\`
 You need to login account before you can post.
Processed in 0.33138 second(s) , Gzip On .