官术网_书友最值得收藏!

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

In the Drupal documentation, you will often find a URL specified in an abbreviated manner, omitting the domain name to avoid confusion since most users will be using different domain names, so instead of mysite.com/page1 you might simply see /page1

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:

主站蜘蛛池模板: 长垣县| 景德镇市| 黑山县| 宁国市| 石渠县| 许昌县| 海晏县| 手游| 普兰店市| 奉贤区| 漠河县| 新蔡县| 凭祥市| 昂仁县| 苍梧县| 龙南县| 泾阳县| 甘孜县| 会理县| 龙南县| 山阴县| 水富县| 惠安县| 巴林左旗| 南木林县| 威远县| 友谊县| 吴忠市| 闽清县| 前郭尔| 新巴尔虎右旗| 长垣县| 宁强县| 兰溪市| 马山县| 祁连县| 梅河口市| 宜都市| 凌云县| 丹棱县| 林芝县|