Building Your First Content Type - Documentation topics on: building your first content type,getting started tutorials,.

Building Your First Content Type

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

  1. Log into the backend of your dotCMS instance.
  2. Click on the Content Types menu item under the Content Types tab.
  3. Click on "+Add New Content Type" button on the right side of the page.
  4. Title your Content Type as "Staff", make sure the "Type" system field is set to "Content", and click "Save ".
  5. Click "+Add New Field" button to begin adding fields that describe a staff member.
  6. **Click on the drop down arrow for "Display Type" and select "Text".
  7. In the Label field, type "First Name" and check the "Required", "User Searchable", and "Show in Listing" checkboxes.
  8. Click "Save Field".
  9. Repeat steps 5-8 to add a "Last Name" and "Email" field.
  10. Repeat steps 5-8 to add "Title" field but do not check the "Required" checkbox in step 7.
  11. Repeat steps 5-8 to add "Middle Name" fields but only check the "User Searchable" checkbox in step 7.
  12. 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.
  13. 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.
  14. 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. 

In the next few tutorials we will be using this Content Type to create new Containers that can be used by Templates and Pages in dotCMS.

*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.