Welcome back! This is the blog post number nine in a series on how to create a Drupal 7 personal website using Stanford Sites. Last time we learned how to add custom fields to your content type. In this post we'll look at why you may want a new content type and how to create one.
By default Drupal provides a couple content types: basic page and article. You can create your own custom content types to organize specific kinds of information in groupings that make sense for your site and your content. For example, a department might need to organize fields to represent people, news, or events. Having a separate content type will make it easier for you to display the fields of that content on a separate page or perhaps a custom view. Custom content types also enable you to stay more consistent with the information you are inputting in your website because it creates a standardized node add form for that particular content type that prompts you to fill out your custom fields. So, let's look at how to create a new custom content type.
Create a new Content type
- From the admin menu bar, navigate to Structure > Content type > Add content type.
- Give your Content type a Name.
- In the Description field, describe this content type. This text will be displayed on the "Add new content" page.
- Configure content type settings then click Save (see below).
Content type settings
Automatic title generation
This setting is disabled by default. The title can be set to automatically generate based on the pattern set using an available syntax [token].
Submission form settings
This tab gives you an opportunity to change the field label title and set preview options.
This tab sets defaults for each new custom content type node created.
- Published: Published nodes will be live on the Web when you click Save.
- Promoted to front page: If checked, all your custom content type nodes will appear on the home page (if you haven't set the front page of your site).
- Sticky at top of lists: In general, Articles are ordered from newest to oldest. This option will do the same thing for your content type.
- Create new revision: If checked, all edits are saved as a revision. You will have the ability to revert to a previous version. Revisions are great because if you accidentally save a change, you can revert back to an older version.
This setting tab is where you can choose to display or not display the author and date information for each content type node created.
You can opt to have comments open, closed, or hidden from this content type.
Choose whether or not to allow revisions for this content type and how much content will display in a comparison preview.
Choose which menu will be available to choose for this content type. You can also set a default menu for this content type.
After going through all the content type settings, click the Save content type or Save and add fields button.
After you've created your custom content type, you can add fields to it. Make sure to check out my blog post on adding new fields to a content type, Getting Started on Sites: Adding New Fields to Your Content Type.