Working With Drupal or Practice What You Preach.

Thursday, 3. December 2009

A little history lesson.

For those of you that have been on another planet for the past 20 or so years, let’s cover some brief history. When I started playing with The Internet, if you wanted a web page, you created it with plain old HyperText Markup Language, or HTML. There weren’t really any WYSIWYG editors, so you had to know at least a little HTML language. Thankfully, the language was really simple. Simple, but rather limited.

What do I mean by limited? Well, you had some basic formatting commands, and could create data tables, but that was about the extent of it. The software industry tried to help by creating programs that allowed non-programmer types to create and edit web pages, but it was still hard to make things look exactly how you wanted them.

Well, In the early 2000s, web browsers (so therefore web pages) began to support and use Cascading Style Sheets, or CSS. CSS moves all the formatting and alignment settings to a new language set that specifies the “Style” of the page and it’s elements. This allows web developers to add cool formatting as well as change the look and feel of the entire site from a single group of settings.

But, all that power CSS brings to the party has a cost. That cost is complexity. Where plain HTML had a 100 or so tags and attributes, CSS has thousands. It even has different settings for different HTML tags. So, to use the CSS properly, you had to have a huge amount of knowledge of HTML and CSS, or a very expensive WYSIWYG editor to create and modify your pages.

To complicate things even further, many people wanted to edit and create their own web page content without any program at all! After all, if you don’t change your content, why would anyone want to go to your site more then once? Thus the birth of the web based Content Management System, or CMS.

Content Management the FOSS way.

So, for a while, programmers were charging tons of money to write custom CMS systems for companies both big and small. Although CMS’ can be complicated, they all work on the same principals:

  1. Allow for easy content creation.
  2. Allow for easy editing of previously created content.
  3. Allow for non technical staff to create and edit content easily.

Most content management systems reside on a web server, thus making it a perfect project for a FOSS group to form around. As a matter of fact, there were quite a few projects started that have grown into stable full featured software solutions. Here is the short list:

And many others. I personally believe that due to it’s maturity and support, as well as the abundant availability of Themes and Modules, Drupal is the best choice here, but I encourage you to evaluate a few to see if it works for your site.

Eating my own dog food.

My company, ACT USA actually hosts a few shared Drupal servers in our data centers. I regularly promote Drupal to our customers, and designed the way we configure and upgrade the Drupal servers. But, I must admit, our web page has been a static HTML site on one of our shared customer servers for years. When ever we wanted to make a change, one of us would just jump up and edit the HTML, trying our best not to screw up the fancy artwork on the page we were changing. This worked pretty well, but as I thought about what our company currently offers, and what is up on the web page, I realized that our web page was rather dated, and to top it off, it didn’t mention any of the really cool things we have been putting into production the last few years.

So off I went to setup our site on Drupal… And after 2 days of working with it, I can honestly say, that it’s pretty simple to get a site up… But, if you want to match your logo colors, or change the feel of the the site, it is a bit of a challenge. I found myself digging through the Drupal web site, and reading php code from the “Themes” I downloaded to figure out how to change things around.

Learning the ropes.

I’m still working on the site, but I’ll give you some hints on what I’ve found / figured out. Here are some good rules to get you started.

Be flexible.

It’s really hard to create your own Theme. I would suggest that you search through all the themes on the Drupal web site, and pick one that has the core features you are looking for. The closer it comes to what you are looking for, the easier it will be to get up and going fast.

Take it slow.

You will quickly discover that there are hundreds if not thousands of 3rd party themes and modules available for Drupal. It’s very tempting to install a bunch of stuff right out the gate, but I encourage you to get the basics done first, then move on to figuring out what cool extras would work well on your site.

Read the Drupal website.

Go to the Drupal Website and read the documentation. You don’t have to read it all, but I suggest you at least scan over the “Concepts” section of the documentation. Doing this before you start might prevent you from wasting a bunch of time wondering why things aren’t working the way “you think they should” (voiced from experience).

Rewiring your brain to use Drupal.

So, you’ve found a theme you like, but you want to change some colors around, and you need to change the sizes of some areas on the pages. If you are an experienced graphics or web designer, you are going to need to try to rewire your brain to use Drupal. Drupal is a mix of hard core CSS and even harder to trace PHP scripting. Themes are not just CSS and image files, (although there are CSS only themes), they usually also contain HTML / PHP based templates, Java scripts, and PHP overrides.

This is not to say that you will need to learn PHP, but you will need to get used to seeing it in your HTML code. And you will be making almost all of your changes in a text editor, not a WYSIWYG editor.

To sub theme, or not to sub theme? That is the question…

And what a question that is. On one side, if all you are going to do is change a few style entries, you can just create a local.css file in the theme directory and edit the <theme_name>.info file to have it read your local.css in. And if all you need to do is comment out an area that you don’t want on the page, then you can just modify the actual theme template.

But here is the problem. Drupal get’s updated all the time. And when it does, themes get updated as well. So when you update your theme, you will need to put all those changes back into the theme. After modifying some CSS stuff, and then changing some graphics files, I decided I needed to override a PHP function. At that point, I decided to create a sub theme. But, the choice is up to you.

What I learned.

With every project I undertake, I learn something. With every post I make in this blog, I learn something. This project was no different.

Here’s the short list:

  • Content entry in Drupal is easy, Changing the way Drupal looks past installing a theme is hard.
  • Someone with a graphic eye will want to make core changes to themes.
  • Most of the WYSIWYG web developers I know, will find Drupal frustrating.
  • Most people that want the ability to change content on their web site, will rarely change anything.
  • Overall, after walking the walk, I still believe CMSs are the future, and Drupal is still my 1st choice.

So, look to see our new web page up in all it’s glory sometime in December 09′

— Stu

Share

Leave a Reply

You must be logged in to post a comment.