Grails

g:layoutTitle ignores title tag in nested template

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2 final
  • Fix Version/s: 1.2.1
  • Component/s: View technologies
  • Labels:
    None

Description

Issue picked up from mailing list:

-------- Original Message --------
Subject: [grails-user] Grails 1.2.0: g:layoutTitle ignores title tag in nested template
Date: Fri, 22 Jan 2010 11:53:05 +0100
From: Jan Kischkel <email hidden>
Reply-To: user_grails.codehaus.org
To: user_grails.codehaus.org

Hi everyone,

we just migrated our application from Grails 1.1.2 to 1.2.0 and discovered a behavior change in the gsp rendering.
If layout gsp sets the title with the layoutTitle tag (e.g. <title><g:layoutTitle default="Layout Title" /></title>) and the decorated page doesn't define the title itself, but renders a template that does, the default title of the layoutTitle tag is used.

So the bug occurs in a structure like this:

main.gsp (the layout, calls layoutTitle)
   ||  test.gsp (the decorated page, no title tag, renders template _title.gsp)
         ||  _title.gsp (a template that contains the title tag) 

If test.gsp would declare the title tag itself, the page is rendered as expected. Previous versions didn't have this problem.

Are you already aware of this issue or should I file a new Jira ticket?

Regards,
Jan

Issue Links

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: