This project is read-only.

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

Topics: General, Writing themes
Apr 20, 2014 at 4: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 21, 2014 at 12:06 AM
It should be in Document.cshtml

Apr 21, 2014 at 1:21 AM
I know but i need different attributes per Layout-url-*.cshtml and document.cshtml is shared for them.
Apr 21, 2014 at 1: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 1:43 AM
Ohh, Yes. You are right. I will try that. I am using this method now in some cases. Thank you so much.