Drupal for the Web Developer: Managing Content For Your Drupal Website

By David Fiedler

In the previous installment of this series, we learned how to tweak Drupal's configuration options for best results. Now we'll learn the ins and outs of the Content Management menu.

To get to the main Drupal configuration menu we'll be working from, you should visit http://YourSiteURL.com/admin/content/ in your favorite web browser, or if you're working on your own local computer. We're also assuming you're logged in as Drupal's administrator. That will get you to a menu that looks like this, containing six submenus:

Comments: This submenu lets you easily view, edit, and approve the comments in the approval queue as well as make similar changes (publish/unpublish) for comments that have already been approved.

Content: This submenu is dedicated to letting you quickly search and find pages and stories by status (published/promoted to front page/sticky) and letting you change these settings as well as jump right to editing the content. You'll probably want to bookmark this page to avoid crawling through menus to find it every time you want to edit stories.

Content Types: As delivered, Drupal comes with just two Content Types: Page and Story. You can put pretty much any content on either a Story or a Page, but they're treated a bit differently in that a Page doesn't accept reader comments and a Story gets featured ("promoted") on the front page of the site.

Here's where you can really customize Drupal in a very powerful way. You could start by adding your own Content Type, calling it something like a Bulletin, and set it up using the Workflow Settings and Comment Settings to be promoted, published, and not accept comments. Now every time you write a Bulletin, you'll know that it will be seen on the front page of the site right away, and that people won't be able to post snide comments regarding your announcement. But wait, there's more.

There's an add-on module known as the Content Construction Kit (CCK) available (free, of course) from Drupal.org. The CCK allows you to create new Content Types online that have certain requirements that you can select. For instance, if you have a photo gallery site, you could define a Content Type called Photo Entry that accepts a photo upload, a text field with the location where the photo was taken, and perhaps a dropdown box so the user could select the type of photo they're uploading. This could let you use this information for searching and sorting.

Post Settings: There are four things you can do on this submenu:

  • Rebuild the sitewide permissions, if they have been scrambled. It's just a button.
  • Set the number of posts on the home (index) page anywhere from 1 to 30.
  • Set the length of the "teaser" portion of a post (displayed in an RSS feed or on the front page) to 200 to 2000 characters, or unlimited.
  • Determine whether contributors will be forced to preview their post before they actually submit it.
RSS Publishing: Lets you change the settings for the general size and appearance of your RSS feed. The defaults are fine for most purposes.

Taxonomy: Any word beginning with "tax..." usually puts people off, but we'll try to make this as painless as possible.

You can think of a taxonomy as a very powerful "category". If you're familiar with concepts such as animal classification, XML, or even genealogy trees, you probably understand how it's much easier to manage data when it can be classified and managed.

The taxonomy submenu essentially lets you set up your own predefined vocabulary, and you can make that hierarchical (with sublevels) or not, as you wish. This way, you could insure that people always used the same words (such as "portrait" or "scenic") when describing a photo and that they would be spelled consistently.

To do this, go to the "Add Vocabulary" submenu. Continuing with the photo example, we've created a small vocabulary as follows (notice that "tags" is not checked, otherwise Drupal allows users to type in free-form tags, which we don't want in this case):

After you've added and saved your vocabulary, it's time to "Add Terms". After a few have been added, you'll have a list like this:

Now you should go to the "Create Content" menu item, and add a Story. You'll see that now you are prompted to add at least one of the predefined terms, which are automatically generated into a selection box. And because we checked "Multiple Select" above, you can verify that you can click on a number of the terms to add them:

Create the story, go to your front page, and you'll see the story with its tags appearing on the right. Congratulations, we've made it through another Drupal administration menu!

Make a Comment

Loading Comments...

  • Web Development Newsletter Signup

    Invalid email
    You have successfuly registered to our newsletter.
Thanks for your registration, follow us on our social networks to keep up-to-date