Adding a page

Drupal has two default content types, Stories and Pages.

So far we have created some stories, but now we will create some pages. Simply go to Navigation | Create content and select Page (instead of Story). You will find yourself on the Create Page form. It should look familiar, it is exactly the same as the Create Story form you used to create stories.

In fact, everything you have learned so far about Stories also applies to Pages (and any other content types you might meet later on). So what is the difference between a page and a story?

We said before that a story is for news or similar information, whereas a page is for static information such as your website contact page. This is true, if a little vague (the reason it is vague is because it is only a rough guideline, you can arrange you website however you like). The real technical difference between a story and a page amounts to three simple facts:

  • A new Story is promoted to the front page, a new Page isn't. This is generally sensible behaviour, you don't normally want your static pages to appear on the front page. It is only a default, you can change it (using the Publishing options on the Create Page form).
  • Users can add comments to a Story but not to a Page. Again this usually makes sense, but it can be changed if needed.
  • Story is a different Content type to a Page.

The last statement requires explanation. The content type is one way of classifying content. If you classify your content in a sensible way, it makes it easy to make Drupal change its behaviour depending on the content.

For example, we might want to have a block on the right side of our page listing the most viewed stories. Of course we don't want ordinary pages in the list – just because a lot of people look at our “Terms and Conditions” page doesn't make it a news item! Drupal can make this distinction because stories have a different content type, so it is possible to create a list including only stories (this is a slightly more advanced topic, possibly using the Views module to create the list block).

Creating some pages

Using Navigation | Create content, select Page and create a new page. Call it “Contact us”, and add your contact details (or some kind of sample content) to the body.

Before you save the page, we will add it to the main menu. Since pages aren't promoted to the front page, there would be no way to access the content page if you didn't add it to a menu (or link to it is some way).

Open up the Menu settings group. We are going to use this to add our contact page to the main menu of our website.

In the Menu link title enter the text you want to appear in the menu (something like “Contact” or “Contact us”). In the Parent item select Primary links (this adds the item to the main menu of the website). Leave the Weight setting at 0.

When you save, you should see a menu above main part of the page. This menu was previously hidden because it was empty, but now it shows the single entry “Contact” which links to our content page.

This entry looks a bit lonely, all by itself, so as an excercise create a few more pages (Home, Legal, Careers etc) and add them to the primary links.