Question

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,,

Était-ce utile?

La solution

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

Try pageProperty in your layout:

<body class="${pageProperty(name: 'body.class')}">
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top