RadiantCMS - Best Ruby Content Management System?

Even the most dynamic websites usually have quite a few pages of content. Sometimes a small shop with an all-technical staff can get away with editing files directly, but most companies and organizations find themselves in need of software to make editing and managing their online content—a Content Management System (CMS). While hundreds of open source CMSs exist, finding one for Ruby is another story. Before discovering Radiant, I had taken a peek at other wikis and CMSs out there, but most seemed too early in development, or too complex for a simple site. Radiant struck a good balance between keeping things simple and doing things right, and I’m happy to say that I had an opportunity to recently take Radiant on a test run with a PAID project.

Why Radiant?

Even the simple sites require some sort of additional functionality. Contact forms requiring sending email come to mind. Adding additional sections to an admin. Some sort of custom widget that gets embedded in your layout. So, it seems that no matter what CMS you use, you can’t escape the fact that you will need to extend it. Quite simply, Radiant has the features that you need, but not the bloat that gets in the way of adding on to it. In fact, Radiant is just a Rails app, so you needn’t fear making changes. It also includes a tagging library called Radius, which allows special functionality to be inserted easily. And, for more heavy work, you can create Behaviors, which have their own Radius tags and other special features.

Getting Started

To use Radiant, simply install using a gem if you prefer:


gem install --include-dependencies radiant

The gem hides much of the Rails code in the gem itself, so I recommend downloading Radiant from the website if you need to make customizations. It simply unzips as any other Rails webapp and you can begin editing the models, controllers, and views as needed. I ended up switching from the gem install to the file install once I realized that Radiant doesn’t include a WYSIWYG editing component. Not to worry though, the simplicity of RadiantCMS allowed me to add WYSIWYG HTML editing to the site pages in about an hour. Not bad…

I won’t go over all of the installation because it can be found right here: Radiant Installation

Creating Content

After you get things rolling, you’ll want to create one or more layouts. I found the fact that layouts can be composed of snippets, page parts, and tags to allow me to create multiple layouts with very little repetition of code. Here’s an example layout:

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html">
<title><r:title /></title>
<link href="/stylesheets/styles.css" media="all" rel="Stylesheet" type="text/css" />
<script src="/javascripts/jquery.js" language="javascript"></script>
</head>

<body>
<r:snippet name="header" />

<table id="table-secondary" width="800" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<r:content part="left-nav" inherit="true" />
</td>
<td valign="top">
<div id="secondary-text">

<r:content />

</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<r:snippet name="footer-nav" />
<br />
<br />
</td>
</tr></table>
</div>
</body>
</html>

After that, I began adding pages in Radiant’s nice hierarchichal structure. Child pages can inherit Behaviors, layouts, and page parts from their parent page, which makes it easy to enforce a consistent look and functionality across various sections of a site.

Well, I hope this article has encouraged you to check out this wonderful CMS. I know that I will be using it for many future websites.


About this entry