[[structure-content-type]]

=== Adding a Content Type

[role="summary"]
How to add and configure a new content type.

(((Content type, adding)))

==== Goal

Add and configure a new content type Vendor.

==== Prerequisite knowledge

<<planning-data-types>>

==== Site prerequisites

You need to have a plan in place for your content structure. See
<<planning-structure>>.

==== Steps

. In the _Manage_ administrative menu, navigate to _Structure_ > _Content types_
(_admin/structure/types_). The _Content types_ page appears showing all the
available types of content. Note that the names and descriptions of the
content types that were provided by your installation profile are shown in
English on this page; see <<language-concept>> for an explanation.


. Click _Add content type_. The _Add content type_ page appears. Fill
in the fields as shown below.
+
[width="100%",frame="topbot",options="header"]
|================================
| Field name | Explanation | Example value
| Name | Name of the content type | Vendor
| Description | Explain the use of the content type | Information about a vendor
|================================
+
--
// Top of admin/structure/types/add, with Name and Description fields.
image:images/structure-content-type-add.png["Adding a Content type"]
--

. Under _Submission form settings_, configure the form that is
used for creating and editing content of this type. Fill in the fields as shown
below.
+
[width="100%",frame="topbot",options="header"]
|================================
| Field name | Explanation | Example value
| Title field label | Label of the Title field that is shown when editing or creating content of this type. | Vendor name
| Preview before submitting | Option to choose whether you should preview the content before submitting. | Optional
| Explanation or submission guidelines | Instructions for creating or editing content. | (Leave blank)
|================================
+
--
// Submission form settings section of admin/structure/types/add.
image:images/structure-content-type-add-submission-form-settings.png["Submission form settings"]
--

. Under _Publishing options_, decide on default options for new
content of this type. Fill in the fields as shown below.
+
[width="100%",frame="topbot",options="header"]
|================================
| Field name | Explanation | Example value
| Published | Make the content item published by default. | Checked
| Promoted to front page | In a default website, this setting can be used to show content on the homepage. | Unchecked
| Sticky at top of lists | In a default website, this setting can be used to keep content on top of a list. | Unchecked
| Create new revision | Create a new revision each time the vendor is being edited. | Checked
|================================
+
Changing these settings does not affect the content items that have already been
created.
+
--
// Publishing settings section of admin/structure/types/add.
image:images/structure-content-type-add-Publishing-Options.png["Publishing Options"]
--

. Under _Display settings_, decide if the author and
publication date will be visible in the content item. Fill in the fields as
shown below.
+
[width="100%",frame="topbot",options="header"]
|================================
| Field name | Explanation | Example value
| Display author and date information | Display the author username and publication date on each vendor page. | Unchecked
|================================
+
--
// Display settings section of admin/structure/types/add.
image:images/structure-content-type-add-Display-settings.png["Display settings"]
--

. Under _Menu settings_, fill in the fields as shown below.
+
[width="100%",frame="topbot",options="header"]
|================================
| Field name | Explanation | Example value
| Available menus | Menus that this type of content can be added to. Vendors do not need to appear in menus, so uncheck all menu options. | Unchecked
|================================
+
--
// Menu settings section of admin/structure/types/add.
image:images/structure-content-type-add-Menu-settings.png["Menu settings"]
--

. Click _Save and manage fields_ to save the content type. The
_Manage fields_ page appears that allows you to add fields to the content
type. See <<structure-fields>>
+
--
// Manage fields page after adding Vendor content type.
image:images/structure-content-type-add-confirmation.png["Confirmation",width="100%"]
--

. Follow the same steps to create a content type for recipes. Example values
for the fields in the forms, where they are different from the steps above:
+
[width="100%",frame="topbot",options="header"]
|================================
| Field name | Example value
| Name | Recipe
| Description | A recipe submitted by a vendor
| Submission form settings - Title | Recipe name
|================================


==== Expand your understanding

* <<structure-fields>>

* Install and configure the https://www.drupal.org/project/pathauto[contributed Pathauto module]
so that content items get automatically generated URLs/path aliases. See <<content-paths>> for more on
URLs within your site, <<extend-module-find>> for instructions on finding
contributed modules, and <<extend-module-install>> for instructions on
downloading and installing contributed modules.

// ==== Related concepts

==== Videos

// Video from Drupalize.Me.
video::https://www.youtube-nocookie.com/embed/vyvqiaaGM1k[title="Adding a Content Type"]

// ==== Additional resources


*Attributions*

Written and edited by https://www.drupal.org/u/sree[Sree Veturi],
https://www.drupal.org/u/batigolix[Boris Doesborg], and
https://www.drupal.org/u/jhodgdon[Jennifer Hodgdon].
