6.2 Creating new content types

Go to Structure > Content types > Add content type (/admin/structure/types/add). Give the content type a name (this should be in the singular; “Entry” rather than “Entries”) and, optionally, provide a description. The description will appear on the "Add content" page, which your users may or may not see, depending on how you configure the site (e.g. you might decide to provide a link in the sidebar for authenticated users to "Add a new project", which takes them directly to the form where they can do that, bypassing the "Add content" page entirely.) It's still a good idea to include a brief description of your content type, as a form of documenting your work for subsequent site developers.

The following settings are provided as vertical tabs underneath the title and description. Additional options may be available there, depending on which modules you install.


6.2.1 Submission form settings

  • Title field label: how the Drupal title field is labeled; see section 5.4.7 for a discussion of Drupal titles.)
  • Preview before submitting: whether to allow or require users who are creating content to see how it'll look before it's saved
  • Explanation or submission guidelines: additional text that can appear at the top of the content creation/editing interface


6.2.2 Publishing options

The default settings are generally fine, and two of the options ("Promoted to front page" and "Sticky at top of lists") are only relevant for specific kinds of Drupal sites, and digital projects tend to not be among them. Note, too, that you're configuring the default options for content creation-- for any given piece of content, users with the correct permission will be able to make different choices.

  • Published: enabled by default. One of Drupal's built-in permission options is "view published content". Having a public site means that you want anonymous (non-logged-in) users to be able to view published content. (Note: there are many ways to refine access permissions, such as only allowing anonymous users to view certain content types; see the section on permissions for more information.) You might want to disable this if, for instance, you want to set up a simple review workflow where a data entry assistant creates content, but you review it before you assign it the status of "published".
  • Create new revision: Drupal can store multiple versions of a piece of content, reflecting different revisions (much like Wikipedia does). Drupal doesn't do it by default, but if you check this box, it will.


6.2.3 Display settings

Display author and date information: enabled by default, this puts a bit of text that reads "Submitted by [user's login name] on [date, by default a long-format version like "Sat, 09/07/2013 - 07:25]" towards the top of the piece of content. There are ways to configure this information (e.g. replacing the user's login name with their first and last name, pulled from their user profile, or changing the date format), or you may want to remove it altogether. It's disabled on the default "basic page" content type, for instance; for blog-like content, you may want to display a thumbnail of the user's picture and a brief bio in the sidebar instead; this can be done using two advanced Views concepts, relationships and contextual filters, described in chapter 13.

For almost any content type, except perhaps those that feature user-submitted content where you want to ensure the user is credited, you should disable this.


6.2.4 Comment settings

If you used the default Drupal installation profile, comments are enabled and this section will be available.

Default comment setting for new content

By default, comments are open for new content types. If you don't want users to be able to comment on a particular content type's content, change the "Default comment setting for new content" to "Hidden". Even if you only want comments on only one content type out of ten on your site (e.g. your project's blog, but nowhere else), you'll have to change the default comment setting for every content type where you don't want comments.

There's another option for comments, "Closed". This shows all existing comments (if they exist, which may be the case if comments were previously set to "Open"), and a message that commenting is now closed. It doesn't make much sense to use this as a default comment setting for new content, because unlike "Hidden", it will display a conspicuous message that comments are closed.

Allow comment titles

Enabled by default, this is a setting that may seem odd if you're familiar with comment interfaces on non-Drupal sites. It's a consequence of the fact that Drupal has its own internal "title" requirement, which applies to comments as well as nodes (content created using a content type); see section 5.4.7 for more information. It may be worth disabling this option for the sake of user familiarity-- when people leave comments on the internet, they don't often think of the comments as having a title. Drupal will create its own "title" for the comment for internal purposes, consisting of the first few words of the comment text, and the user won't have to deal with this particular quirk.


6.2.5 Menu settings

You can choose which menus are available for the content creator to choose from when creating a menu link, as well as a default parent for new menu items.

Note that these settings do not automatically add new content to a menu, they just define the options available when the content creator specifically chooses to do so. The Auto Menu module can automatically add new content to a menu.

Once you're done with these configuration options, choose "Save and add fields" to save your settings and move on to the area where you can define what information you want your content type to store, and how.