Content Types are basically the lists of formatted fields that content contributors will use to fill out the required information for a specific type of content. This is very similar to building a page form but much easier. For the purposes of this tutorial, we will be creating a *Content Type that will be storing "Staff" type content.
Creating a "Staff" Content Type
- Log into the backend of your dotCMS instance.
- Click on the Content Types menu item under the Content Types tab.
- Click on "+Add New Content Type" button on the right side of the page.
- Title your Content Type as "Staff", make sure the "Type" system field is set to "Content", and click "Save ".
- Click "+Add New Field" button to begin adding fields that describe a staff member.
- **Click on the drop down arrow for "Display Type" and select "Text".
- In the Label field, type "First Name" and check the "Required", "User Searchable", and "Show in Listing" checkboxes.
- Click "Save Field".
- Repeat steps 5-8 to add a "Last Name" and "Email" field.
- Repeat steps 5-8 to add "Title" field but do not check the "Required" checkbox in step 7.
- Repeat steps 5-8 to add "Middle Name" fields but only check the "User Searchable" checkbox in step 7.
- Repeat steps 5-8 to add a "Phone" field but next to the Validation RegEx select "US Phone" from the drop down list (This will force some validation rules that content entered should be in standard US Phone format [Ex: (305)255-6900] or [305-255-6900]). Only check the "Required" checkbox for step 7.
- Hover over any of the Labels for the field names and you will notice that your cursor becomes a hand with a finger pointing up. Click on field labels and drag them into any order you desire.
- Now click the Content tab and begin adding new content of the new Staff content type.
Your saved Content Type should resemble the content structure shown in the image below.
Congratulations! You are now ready to start contributing content of the type "Staff". Click on the Content tab, select "Staff" from the content "Type:" field and then click "+Add New Content" on the right site of the page. Fill out the fields for staff members and "Save/Publish" your content. It's just that simple.
*A complete documentation section is also available on Creating a Content Type.
**As a webmaster, it is important for you to become familiar with ALL of the possible field types you can create in a Content Type. Refer to our documentation on Adding Fields to a Content Type.