kentico_radekm
-
9/4/2009 4:54:04 AM
RE:Changing Body ID dynamically.
Hello.
I am not quite sure what ID do you mean. You mean class parameter? If you are using Portal engine, then <solution>/CMSPages/PortalTemplate.aspx is used as master page and you can dynamically change its properties in its code-behind, e.g. in OnPreInit method. E.g. if you want to change class parameter, you can change "this.BodyClass =" parameter. You can change it e.g. on dependance on current node´s alias path using this condition
if (CMS.CMSHelper.CMSContext.CurrentDocument.NodeAlias == "someNodeAlias") { this.BodyClass = "something"; } else { this.BodyClass = "somethingElse"; }
If you want to achieve something else, could you please clarify it? Thank you.
Best Regards, Radek Macalik
|