Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Add class to body

$
0
0
Short answer, depends.

Long answer; its definitely easiest if your Template is based on Masterpage (WebForms) due to its Lifecycle pipeline.

For instance, you can in your function do
HttpContext.Current.Items["bodyClass"] = "someBodyClass".
In your Template you mark your body-tag with a runat="server" attribute, and in your PreRender event you add pull out the value from
HttpContext.Current.Items["bodyClass"]
and assign it to the body.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>