Drupal 8 installation and configuration:
an example site


Content types


As we have seen, we have, pre-defined, two "content types": "Article" and "Basic page". Content types are customizable: we reach the "content type" page from the "structure" section of the administration menu.

Content types are made up of fields, with a well defined structure and associated with a widget; there are a lot of available fields, for: dates, numbers, images, email, links, lists, different types of text etc. etc.; each field have its own properties as: a label, an help text, default values, if present multiple times, etc.. Different fields have different properties.

Each content type has its own field structure: a "basic page" consists of an unique field, for the HTML text; an "article" has also comments, an image, and keywords (tags).

content types
Clicking on the "Manage fields" button we reach the configuration page for the content type. We have four tabs: an "Edit" tab for some general options, a tab to add or modify fields, a "form display" tab, to define the form used to insert content, and a "display" tab, to define as the content type is shown to the site visitor.

In the "edit" tab we find a name and description for the content type, and a number of options at bottom; in "Menu Settings" a choice of available menus for the content type.
content type edit tab
We have also settings for the submission of contents, with options for the preview of the content and an help text.
content type options
In the "publishing options" we can define some defaults used when editing the content. in the "display settings" we can say if the author and the date of the content will be shown along with the content.
content type options


Basic page fields

The unique field of the basic page: the "Body", has, as properties: a label, an help text, and default values. The field can be made mandatory ("required field" box checked); the user can also enter a summary, which will be used in views for some types of display, there is a checkbox at bottom to allow an explicit summary. When a summary is not given an automatic summary is build by Drupal by trimming the HTML text.

The "Field setting" tab is for giving some other options to the field, as the number of occurrence of the field in the content; here we have only one "Body" allowed.

The line: "Browse available tokens" can be used to insert, in the body or in the summary, some special markups, which Drupal changes in elements like: date, url, site name etc.

basic page field
basic page field

To the "basic page" we add a numeric field for ordering, as shown in the following figures. We will have only one copy of the ordering field in the basic page; we define a label, an help text; the field is mandatory and we set a default.
ordering field
ordering field
ordering field

We insert also some other fields: a "Category" field, for terms from the taxonomy dictionary we have created, a "Keyword" field, for terms from the "tag" dictionary and "Metatags" , for auxiliary informations for web crawlers. Our "basic page" has now five fields, as shown in the following picture.

ordering field
In the following figure we show the properties of the added "Categories" field; we have a label, an help text. This is not a required field and, as a default, the field is the "Special items" category. We limit the possible choice of values to terms in the "Sections" vocabulary. We allow for an unlimited number of categories.
sections field
sections field
Below the "field settings" tab, where we allow for an unlimited number of categories.
sections field
The properties of the "tag" field are similar,t we limit the choice of terms to the "Tag" vocabulary but here new terms can be inserted by the user.
sections field



Form display


The following image shows the settings in the "form display" tab, which configures the form used to insert basic pages. We can change the order of items by using the mouse, dragging around the cross at right, but the real order depends also on the used theme. The second column is for the choice of the HTML widget used, but most field allow for a single widget. Clicking on the gear at right gives access to some settings for the widgets, as the number of row in a text widget or the label of a checkbox. We have rearranged the items and increased the number of rows for the body. We don't want some new contents going into the main page, so the corresponding checkbox is moved down, among the disabled fields.

Form display



Display


The following image shows the settings in the form "display" tab, defining how basic pages are shown to the site visitor. Items can be reordered using the mouse, as in the "form display"; each field has a label which can be hidden, above or on the same line and a "format", which defines some details of the visualization. In the following image we show the "Manage display" tab for the basic page; we have to remember to disable the "ordering" field, clicking on the dropbox button in the third column, or this field will be shown to the site visitor.

Display
The "Custom display settings" section, at bottom, allows to create different display settings for different ways to view the content. There is a custom display for the "teaser" view mode; for this reason we have two "sub-tabs": "Default" and "Teaser", the teaser tab defines how the page is shown when a simple summary is needed: the format of the body is now: "Summary or Trimmed", and all fields are disabled. We limit the number of characters used to truncate the text to make a summary. The "link" field adds, to the summary, a link to the full page.
Display
View modes can be created in the menu: "Display modes", of the "Structure" administration section. For view modes there is also a link in this page, at the bottom of the:"Custom display settings" section.
custom view modes