Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3696186
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:42:30+00:00 2026-05-19T04:42:30+00:00

I have defined a layout, ‘mainTemplate’ for my grails application. I use g:layoutHead (so

  • 0

I have defined a layout, ‘mainTemplate’ for my grails application. I use g:layoutHead (so my pages append their head section to the layouts).

But when I look into the source of my home page, I still get the meta info for the layout.

Though I get my page rendered in the defined template, but I suppose grails should have removed this meta info.

http://grails.org/doc/1.3.x/ref/Tags/layoutHead.html

How do I remove it? Or am I missing something here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:42:31+00:00Added an answer on May 19, 2026 at 4:42 am

    If you’re using the <meta> tag to define the layout, it’s not easily removable. However, you can use <g:applyLayout> in your views to avoid using the <meta> tag.

    <!-- a GSP view, e.g. views/foo/index.gsp -->
    <g:applyLayout name="main"><!-- value for "name" is the same as what you'd use in the meta tag -->
      <html>
        <head><title>My Decorated Page</title></head>
        <body>
          Some content
        </body>
      </html>
    </g:applyLayout>
    

    Essentially what you’re doing is removing the <meta> tag from your view and then wrapping the contents of the view with the <g:applyLayout>.

    Admittedly, this is a lot of work; you’d need to update all of your views, and also probably update the scaffolded views in src/templates (if you’re using scaffolding). To be honest, removing the <meta> tag from the final view seems largely unnecessary except for some very exceptional cases (e.g. a naming conflict with “layout”, or that you just have to prevent those extra ~35 characters from being sent over the wire, which seems pretty micro-optimization-happy to me).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a layout defined in XML. It contains also: <RelativeLayout android:id=@+id/item android:layout_width=fill_parent android:layout_height=wrap_content
I have the following layout defined for one of my Activities: <?xml version=1.0 encoding=utf-8?>
I have a relative layout defined in a xml file(say realtive.xml). In another layout
I have a ContentPane defined as follows: <div id=searchResultsContentPane data-dojo-type=dijit.layout.ContentPane data-dojo-props='splitter:false, region:center'></div> I am
I have a border layout whose center panel is defined like the below. {
I have a listView with custom objects defined by the xml-layout below. I want
I am just atarting to use Susy I have defined my layouts, I needed
I have the following layout defined in XML: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_height=wrap_content
I have a QCheckbox in a grid layout defined as such: self.isSubfactorCheckbox = QtGui.QCheckBox('Is
So I have a custom view set up in code (no XML layout defined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.