kentico_radekm
-
1/15/2010 11:43:29 AM
RE:How to change class attribute in body tag in Master Page
Hello Leandro.
Unfortunately, there is no easy way how to change this attribute from any page using a user control. But you can try following approach. 1. In your custom web part, in OnInit event, use CMS.GlobalHelper.RequestStockHelper.Add(String, Object) method with some proper parameters (please see our API reference file for more details). 2. Then, in CMSPages/PortalTemplate.aspx.cs, in OnPreRender() handler, you will call CMS.GlobalHelper.RequestStockHelper.GetItem(String) and get a value from point 1. 3. You can test this value and decide about this.BodyClass property´s value.
Best Regards, Radek Macalik Support Engineer
|