forked from douglasr/radiant-body-class-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
50 lines (34 loc) · 1.15 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
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.0
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>
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.