-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
61 lines (40 loc) · 1.41 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
BodyClass extension
-------------------
An extension for Radiant CMS that allows you to set a body class attribute for
each page.
Created by: Douglas Robertson -- www.edgeoftheearth.com
Version: 1.2
Usage
-----
Set the body class attribute of each page. Access the contents of the attribute
with the body_class tag as such:
<r:body_class />
Typically, this would be done within your layouts. For example:
<html>
<head>
<title><r:title /></title>
</head>
<body class="<r:body_class />">
<r:content />
</body>
</html>
You can also inherit the body class from the parent (or ALL parents) using the
inherit attribute.
<r:body_class inherit="true" />
<r:body_class inherit="all" />
Installation
------------
script/extension install body_class
or
git clone git://github.com/douglasr/radiant-body-class-extension.git vendor/extensions/body_class
rake RAILS_ENV=production radiant:extensions:body_class:migrate
rake RAILS_ENV=production radiant:extensions:body_class:update
Acknowledgements
----------------
Thanks to Trevor Robertson for showing me the usefulness of body classes and
for pushing me to build something that makes it easier to use this technique
(content parts are so clumsy). Thanks also to all the Radiant extension
authors whose code I read through in order to learn how to do something as
simple as this.
Thanks to Aimerick Desdoit (GitHub: Aimerick) who added support for inheriting
from parent pages.