Drupal Tutorial Part 2 - What is a node and other basic questions

So maybe “basic” wasn’t the best choice of words but you get my drift, I’m going to go over the terms you absolutely MUST know before doing anything with Drupal . Trust me, it’ll save you a lot of time, time that I spent by just barging into Drupal head first without reading anything. So you just installed Drupal now what? Lets get these defintions out of the way, if my analogies seem childish please don’t be offended it’s my way of explaining abstract concepts. Here goes:

Have you ever seen one of those Russian dolls that open up and a smaller doll is inside? Think of Drupal like that, and think of the following concepts like that. 1 will contain 2, which will contain 3, and on.

1. What is a Theme?

A theme is the basic template that your site will be styled by. This means that in all your themes you will have a CSS file that will control most, if not all, the styling of your site. Want to change the color of your links? Increase the width of the content? Float images to the right? Check your theme. That file will be called “something.css”. Get to know this file well, it will be your best friend. My .css file for Criticalsole is over 2500 lines long. Oh if you don’t know CSS, then I’d suggest learning it. I’m pretty anti-tables, it’s probably due to the endless frustration of website maintenence.
The theme is the largest Russian Doll.

Creating your Own Custom Theme
I’ve gotten a lot of emails asking how to create a custom theme or how I created my theme. Truth is, theming is as much to do with Block placement (no worries, I’ll explain what blocks are soon) and CSS styling that anything else. That said, I’d actually recommend picking a theme and altering it to your heart’s desire. However if everyone would still like to learn how to create a Custom Theme I’ll discuss that a bit later. I’ve created my own custom theme and have serverly altered existing themes and I’d say it’s pretty much a draw on which is easier or more effective.

2. Onto the Basics - What is a Node?

A node can be thought of as an article in a newspaper. You can have multiple nodes on a page, a node can be an image, story, or an image and story. Truth is a node can be anything you decide you want it to be. Let’s say you are selling shoes, a node for you might be a picture of the shoe, a description of the shoe, and the price of the shoe. If you already are messing around with your Drupal install, then click on “Create Content”, anything you click on there will be considered a node. I could go forever on about nodes, but nodes are best understood by self-discovery. Drupal comes with a couple node types standard, them being a page and a story. Hint: You can have multiples nodes on a page, just like you can multiple articles on a newspaper page.

Example:
If you go to Criticalsole.com, on the homepage there are a 3 nodes on the left side of the page. In this case each node consists of an image and text. I used CCK (explained later) to create my own custom node type.
Modules that you should download:

Before I do this I might as well explain what a module is. A module is an application that will provide a feature site wide. For example a module that I use is called “Service Links”. This module adds those nice little digg, newsvine, del.icio.us, and reddit links across the bottom of my nodes. Obviously I’m summarizing what a module does, but I’m a simple man so my explanations are simple.

But, I digress, here are some very important Modules you should download that relate to Nodes:

CCK - This is an absolute must. Do you remember the shoe node example? Well CCK allows you to create custom node types. If you wanted to create a node with an image, price, shoe size, address, etc as fields in a node then CCK is your best bet.

Image - At some point you probably are going to want pictures on your site. Download the image module and you’ll be able to create image nodes.

There are more modules, but these will keep anyone busy for quite a while.

3. What is Taxonomy?

If only I knew! Just kidding. Though I remember when I first saw the word Taxonomy, I thought to myself, why would someone do that to newbies. The answer being that the Drupal programmers have a sense of humor and chose to pick a totally obscure word to weed out anyone not serious about their creation. So when I think of Taxonomy the analogy that makes the most sense to me is a 3-ring school binder with dividers. Basically each divider is a term that you apply to a node. Vocabulary is a group of terms. For example, a Vocabulary could be Math, and the terms could be homework, tests, and quizes. So if you took a Math test you would file it under the Math vocabulary in the test term. Taxonomy basically allows you to file away your nodes in easily reachable sections first by Vocabulary and then by term. The hierarchy looks like this:

Vocabulary (Math)

Terms (tests - homework - quizes)

I hope that helped this article helped explain some of the Drupal puzzle. If not please feel free to comment and I’ll make sure to answer as quick as possible. Next up….blocks and regions.

share this story
Add 'Drupal Tutorial Part 2 - What is a node and other basic questions' to Del.icio.us Add 'Drupal Tutorial Part 2 - What is a node and other basic questions' to digg Add 'Drupal Tutorial Part 2 - What is a node and other basic questions' to reddit Add 'Drupal Tutorial Part 2 - What is a node and other basic questions' to Technorati 

One Response to “Drupal Tutorial Part 2 - What is a node and other basic questions”

  1. Federico Feroldi’s blog » Blog Archive » links for 2007-09-24 says:

    […] webpodge » Blog Archive » Drupal Tutorial Part 2 - What is a node and other basic questions I’m going to go over the terms you absolutely MUST know before doing anything with Drupal . (tags: drupal tutorial howto article) […]