I wrote before about the new 34th Street Magazine website being in Alpha.
This is the first post of a series on what we did to Drupal to make it behave the way we want it to, how we implemented different features and to ask for feedback and advice on how to do future features.
To start out understanding Drupal, it’s important to understand that Drupal was designed and the developer’s focus is largely on creating flexible websites for communities, NOT for publishing or blogging. For instance, there isn’t a natural distinction between readers and administrators among the user roles. (Adding content is at node/add/* not admin/*) A lot of the work involved in setting up a site on Drupal is to work around the default values and settings and make it behave the way you want to.
Part of the joy of using Wordpress is that it’s defined for a very specific purpose and all the development work that goes into it is designed to make it easier to blog. With Wordpress, it takes very little work to go from a default install to writing your first post.
That’s not true for Drupal. No one would use Drupal with only its core functionality and the default settings. But with a little work, it becomes much, much more powerful and better suited for publishing a news website than Wordpress.
The problem I’m still struggling with now is how to import data into Drupal’s database. The database structure is quite complex compared to our current site, or a Wordpress site, but luckily the Content Construction Kit abstracts all of that when the site is being built. And that’s the topic of today’s post.
Nodes, Users and Custom Content Types!
Everything in our system is a node. Stories. Slideshows. Sections. Authors. Issues.
The CCK module lets us define all the different information each node needs and tie authors to articles and articles to sections and issues with node reference fields. Each content type is themed separately with a different template and the different ways that piece of content can be viewed are defined by a set of boolean PHP variables.
Our site uses the following CCK content types.
At the database level
When creating fields and content types, this is all you see. Pick data types and title them. For the most part, the rest of the process is completely opaque. To learn more about the database structure of CCK, there’s documentation in greater detail here.
There are several tables that store data for CCK fields.
- node – This table stores the unique nid of the node, and what type it is.
- node_revisions – This table stores the body content of the node, as well as data about which user created it, when it was revised and what’s in the teaser.
- content_type_[type] – If a content type has fields that are only used by that content type, this table contains the values of that field.
- content_field_[field] – Contains the values of that field.
Theming
A lot of the heavy lifting in Drupal is done at the theming layer. Luckily Zen makes it all much easier. That’s what I’ll be writing about next time. Some of the other upcoming posts will address how we handle images (Imagecache and CCK), how we theme our newsletters and how we handle multimedia.
What did you think of this post? Got more questions about our Drupal install? Leave a comment. The new website is at http://beta.34st.com, poke around and leave us some feedback!



Hey, this is great stuff! I look forward to the rest of the series. We’re working on relaunching our Drupal-based site at George Mason University and this is very helpful. Thanks!
November 18th, 2008 at 12:08 pm