How to add some data-* attribute to body tag?

Topics: General, Writing themes
Apr 20, 2014 at 3:35 PM
I want to add the following attributes to body tag. But in Layout.cshtml i have no body tag.
data-spy="scroll" data-offset="25"

How can do this?
Apr 20, 2014 at 11:06 PM
It should be in Document.cshtml

Apr 21, 2014 at 12:21 AM
I know but i need different attributes per Layout-url-*.cshtml and document.cshtml is shared for them.
Apr 21, 2014 at 12:35 AM
You can try putting the values in Layout shape, like it's done for Layout.Title, in your Layout-url-*.cshtml files and use the values in Document.cshtml.

Apr 21, 2014 at 12:43 AM
Ohh, Yes. You are right. I will try that. I am using this method now in some cases. Thank you so much.