- Drupal 8 Quick Start Guide
- J. Ayen Green
- 531字
- 2021-06-10 19:45:30
What is content?
We all know what content is...sort of. This book is made up of content. This chapter contains content, as does this section within this chapter. The more important question is: what is it in the context of Drupal? This question is best answered with the home page as an example, because you'll know it when you see it!
The following screenshot shows a piece of content that I added to the site, in the main content area, with a thick rectangle around it:
When rendered and displayed in the browser, it's simply content, but up until that point, it is content of a certain type, of a content type, also known in Drupal as a node bundle. Does Drupal look at this content simply as:
Chapter 2 - Understanding Content Types
We all know what content is ... sort of. This book is made up of content. This chapter contains content, as does this section within the chapter. The more important question is, what is it in the context of Drupal? The question is best answered with the home page as an example, because you'll know it when you see it.
No, content is stored within Drupal in a way that facilitates selecting it based on almost any criteria you wish.
Let's take a look at the database for a moment. This isn't something that you need to learn, but it's good for illustration purposes. If we were to look at the main identifying information for this piece of content within the Drupal database, we would see this:
+-----+------+---------+--------------------------------------+----------+
| nid | vid | type | uuid | langcode |
+-----+------+---------+--------------------------------------+----------+
| 1 | 3 | article | 6166dc8e-1c64-4897-807e-7c535934f616 | en |
+-----+------+---------+--------------------------------------+----------+
You can see this in the article value in the type column, which contains the content type in this table. "Article" is the content type of our content. Let's leave the database behind and look at our content and its content type in the way that you will use it, via the user interface (UI).
One of the pages used most often by a content editor is the content administration page. We'll begin there by clicking the Content link in the admin menu, which will take us to admin/content, as shown in the following screenshot:
As you can see in the preceding screenshot, our content is listed, its title is on the left, and the type given is Article. We will learn more about the use of this page in Chapter 4, Creating and Editing Content, but for now we want to use it to lead us to the page on which we can edit our content. Let's click the Edit link at the opposite end of the row from the content title, which will display a node edit form for the content, as shown in the following screenshot:
- Node.js Design Patterns
- Monkey Game Development:Beginner's Guide
- C語言程序設(shè)計(jì)(第3版)
- x86匯編語言:從實(shí)模式到保護(hù)模式(第2版)
- 信息安全技術(shù)
- .NET 3.5編程
- Unity 2017 Mobile Game Development
- Java SE實(shí)踐教程
- Mastering C++ Multithreading
- MINECRAFT編程:使用Python語言玩轉(zhuǎn)我的世界
- Python大學(xué)實(shí)用教程
- Bootstrap for Rails
- Kotlin Programming By Example
- Mastering Embedded Linux Programming
- Java Web開發(fā)教程:基于Struts2+Hibernate+Spring