2

I have some issue on grails siteMash issue.i need custom class define in every GSP page when i call but in my layout page i am having only instance of all class.so every page i will change as i need.But i tried pageProperties that not work may be i was on right direction.Kindly see my case;

My html page have:-

 <body class="A">
 <body class="A logged-in">
 <body class="B billing logged-in">
 <body class="C logged-in">
 <body class="D popup">
 <body class="E">
 <body class="F logged-in">
 <body class="G logged-in">
 <body class="h logged-in">

what i am doing is:-

in my name.gsp //this is my template layout page that have

and in every page i am using as above like but not getting these body class on html view

it showing layout body class.if i used any specific class in body then all page get same.

thanks in advance,,

1 Answers1

5

You can use sitemesh features for this. Look more at an article

Try pageProperty in your layout:

<body class="${pageProperty(name: 'body.class')}">
Cedric
  • 195
  • 4
  • 10
uladzimir
  • 5,639
  • 6
  • 31
  • 50
  • Thanks,for help.what about if case.here it show error that Grails tag [sitemesh:captureBody] was not closed. like any how is in last. – uttamjaiswal Feb 19 '14 at 09:42