So You Need a Website - Part II - What On Earth Is a Content Management System?

Part I of this series discussed the website software Drupal and Wordpress; both applications create what are known as content management systems, or CMS's. When we first started creating websites, we thought of them as online brochures with static pages that didn't change much. We might update an "Our People" page, if someone left and we hired a new person. Or, if we posted quarterly earnings reports, we'd update it every quarter. But most of the content on the site stayed the same. A CMS is a much more flexible and interactive animal.

With a content management system, the website works like an online database. Pieces of content show up in different places, depending on how you mark them; for example, what you're reading is a blog post, so it will, by default, show up in the blog column on the front page of the site. That column is set up to show the eight most recent blog posts; once eight more blog posts have been posted, this one will cycle out of that column. But we also have a field on the page in which we create the blog posts which lets us mark it in any of a number of categories; I'm marking this one as a congregational resource, so it will also show up in the "Resources for Congregations" column on the front page until it cycles off. And it will remain on both the Blogs page and the Resources for Congregations page forever. I don't have to do anything other than check a category for this post to show up on the page for that category; that's why sometimes you'll see the same thing in different columns on the front page - it's coded in two different categories.

How does that happen? Here's where I get to use one of my favorite words: it's automagical. Seriously, it happens because in Drupal, a page doesn't really have to be a page; that confused me probably more than anything else when I started working with it.  I was so used to that online brochure paradigm that I couldn't get the image of distinct pages out of my head. I kept wanting to go in and edit pages and I couldn't find a page to edit. A CMS is not like the older type of website where you have a series of files on a server, each of which is a page that you can open and go in and directly edit the content.

In Drupal, everything you create is a node of some kind: it's a blog node, or a picture node, or a menu node, or a form node, etc. All the nodes live in a database, which is the central "hive" of the website.  (That's literally the way I visualize it - as a hive. Why? I don't know, maybe because it's the center of activity for the site.)  What you do when you create a site in Drupal is tell it where you want it to display all those nodes.

I had a "Eureka!" moment about this. I had been struggling with how to structure the Foundation's website early on in the process. Really struggling. I just couldn't wrap my mind around how this worked. On the other hand, I love databases; I've been building them for 25 years, and they are like a nice warm home on a cold, wet day to me - comfortable and cozy. I really love working on them. So, there I was, trying to figure out how in the world this darn software worked, and it was exactly like a lightbulb went off. "IT'S A DATABASE!" I thought. "It's a database, and what I've been thinking of as pages are like various layouts in a database, displaying the same data in different ways." I felt exactly like Gene Wilder in Young Frankenstein, reading his grandfather's notes and realizing that "IT! COULD! WORK!" Great moment.

There are a number of ways to make this happen in Drupal; the one I used most often is something called Views.  You can create a view that assembles all the nodes together that have any one thing in common. For example, I've coded the blog posts in this series as congregational resources, which is one of our categories. I created a view called congregational resources that pulls together everything marked as being in that category; wherever I choose to include that view, all, or any number I select, of the nodes coded as congregational resources will be displayed. There is a block (Drupal's term) on the front page titled "Resources for Congregations".  It consists of the five most recent congregational resources nodes. If you scroll to the bottom of the block, you'll see a link that says "See all resources"; if you click that link, it will take you to a page which includes all the nodes coded as congregational resources.

I said above that Drupal doesn't have pages. It does, in the sense that when you click on a link, it takes you to a display that looks like a page and is different from the display you were on. And you can create something called a page in Drupal. But you don't end up with an HTML file that you can directly edit, which is how websites used to be set up. So when you click on the "See all resources" link at the bottom of one of the view blocks on the front page, what it actually takes you to is a view page - a display that consists of all the pieces coded in that category, plus all the things like headers, footers, and menus, that show up on every page.

Yes, this is different. Yes, this is tricky to wrap your mind around. But - and this is the great part of this - once you have it set up, all you have to do is create new content and mark it in the category you want it to be in, and it shows up exactly where it should be. No copying text, no moving files around, nothing like that. Write it, code it (which is really just clicking on an item in a list), and save it, and it's there wherever you want it. And since everything by default displays with the most recent items at the top, older, out-of-date items drop down the list by themselves.

So instead of a website being a collection of static pages that can become outdated very quickly, we have something that is vibrant and living and can be easily updated and managed. In the next post of this series, I'm going to talk about updating and managing a CMS website. As always, I'm happy to answer any questions about any of this; you can either sign up for an account on our website and post a comment to this blog, or you can click the Contact Us link and submit a question through it. If you choose either General Inquiry/Other or Website Feedback from the Category list, the question will come directly to me.