Skip to content

An extension for Radiant CMS that allows you to set a body class attribute for each page.

Notifications You must be signed in to change notification settings

lunaweb/radiant-body-class-extension

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An extension for Radiant CMS that allows you to set a body class attribute for each page.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%