How to structure content
The main source of content in Drupal is nodes. As we saw, the output of a node is used to fill the main content block of a page.
Nodes are associated with a specific content type that defines the fields and display settings for that type of content.
On our demo website, we’ve defined some content types to represent a trip, a landing page, and a base page; the full list is here: /admin/structure/types
.
The demo website uses two approaches to structure content:
- By directly using fields
- By splitting a page into sub-components that can be used to build more complex layouts
We can use the first approach to build pages constrained to a specific layout, such as the page that describes a trip:
Figure 6.9 – A content type built with fields
For this kind of content, an editor can only choose the values to insert for each field. They cannot choose, for example, that the text must be rendered before...