Drupal concepts
Drupal's building blocks
Themes
Drupal comes with a number of pre-loaded themes, which determine how your page is laid out. The standard themes are fine, but you may want to try out some of the many user-written themes. Each theme defines a number of regions, which are the places where your website content will be placed. Typically a theme will have the following regions:
- Header: this will hold the website name, logo, slogan, mission statement etc
- Left sidebar: usually used for a menu
- Content: main content region
- Right sidebar: usually optional, a good place to put secondary menus and other "gadgets"
- Footer: you might want to put messages, links etc in this region
Blocks
Block are pre-determined chunks of content. Some, such as the search box and the navigation menu, come built in to Drupal. Others are supplied by add-on modules, for instance, you might install the "random quote" module, which gives you a block to let to place quotations on your pages.
For each block you can determine:
- whether or not to display it
- which region of the theme you are going to put it in
- which pages it is displayed on - eg front page only - or which pages it is not displayed on
- which user roles can see the block
Nodes
Nodes are the main unit of Drupal content. There are many different types of node - the basic ones are page and story, but there are many others. Add-on modules will also create additional node types. You create a new node by clicking the Create content menu item and selecting which type of node you want. The basic elements you will see are:
- Title: the title of the node
- Body: the main text of the node
- Other fields, dependent on the node type
Other elements of the node include:
- Menu: you can position the node in a menu whilst editing the node by specifying its title and position in the menu structure. Note: Drupal stores the menus separately from the nodes, so you can also control the menu in the menu administration screen. This can be confusing at first - just remember that menus and nodes can be controlled separately.
- Comment settings: whether this node allows comments
- Publishing options:
- Published: you can publish and unpublish nodes
- Promoted to front page: if you use the default front page, the Drupal front page will show a short teaser and a link to your node
- Sticky at top of lists: wherever the node is listed (eg on the front page, this will bring it to the top)
Teaser
Whenever your node is listed (eg on the front page) the title and short teaser will be displayed. By default the teaser will be the first few characters of the node body. You can control where the teaser break is when you are editing the node body.
Normally the body of the full node will consist of the teaser and the rest of the body. You can tell Drupal not to include the teaser in the main body - effectively this lets you have a teaser and a body which are completely different. This is useful when the first part of the body would not be meaningful as a teaser.
Modules
Modules are add-ons for Drupal. Some come built-in to Drupal and can't be switched off. (Block, Filter, Node, System User). Other built-in modules are optional - some examples:
- Aggregator - for RSS news feeds
- Blog
- Forum
- Path lets you rename URLs to give them friendlier names
There are also very many user-supplied modules, covering a huge variety of tasks.
Once you have installed a module, you might see some or all of the following features:
- New blocks, eg Search
- New content types - ie new types of node
- New menu items
- New features on existing screens - for instance, adding the IMCE module adds an image browser and uploader to the user screens. This is a very powerful feature of Drupal - a module can hook into other parts of Drupal so Module A can extend the features in Module B.
Users, roles and permissions
Users
You can create users within the Drupal CMS. There are two special users:
- The Administrator (user 1): This is the first user created on a brand new Drupal system. The administrator has access to everything - so the user ID and password need to be craefully controlled.
- The Anonymous user (user 0): Any visitor who is not logged on is automically assigned as the guest user.
There are a number of ways that users can be created, depending on how you have set up the system:
- Visitors to the site can register as users and are automatically granted a user ID and password
- Visitors can register, but their registration does not become active until an adminstrator approves it
- Users can only be created by an adminstrator
You can control what each user can do by means of roles and permissions.
Roles
Roles are granted to each user by the administrator, A role is a list of permissions which determine what a user can do. Roles are, effectively, the link between a user and the tasks they are permitted to do.
There are two special roles, which are built into the system:
- Anonymous user: Visitors who are not logged on are automatically granted this role.
- Authenticated user: Users who are logged in are automatically granted this role.
The administrator can also create additional roles and assign them to users.
Permissions
Each role is granted a list of permissions, i.e. the operations permitted to a user holding the role. Examples of permissions are:
- create content
- edit content
- delete content
- etc
Administration screens
Drupal has administration screens to let you control all of this. These break down into the following topics:
- Content management: control the actual content
-
User management: control users, permissions etc
- Reports: logging, status etc
- Site building: manage blocks, modules, themes etc
- Site configuration: basic (but important) site configuration controls
