Skip to content
An extension for Radiant CMS that allows you to set a body class attribute for each page.
Ruby
Find file
Pull request Compare This branch is 9 commits behind douglasr:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
db/migrate
lib
README
Rakefile
body_class_extension.rb

README

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.
Something went wrong with that request. Please try again.