Skip to main content

内容管理器简介

¥Introduction to the Content Manager

内容管理器是 Strapi 的核心插件。该功能始终默认启用且无法停用。当应用处于开发和生产环境中时都可以访问它。

¥The Content Manager is a core plugin of Strapi. It is a feature that is always activated by default and cannot be deactivated. It is accessible both when the application is in a development and production environment.

内容管理器可从

¥The Content Manager is accessible from

Content icon

主导航中的内容管理器,它会打开一个显示 2 个类别的子导航:集合类型和单一类型。每个类别包含可用的集合和事先使用 内容类型生成器 创建的单个内容类型。管理员可以从这两个类别中创建、管理和发布内容。

¥Content Manager in the main navigation, which opens a sub navigation displaying 2 categories: Collection types and Single types. Each category contains the available collection and single content-types which were created beforehand using the Content-type Builder. From these 2 categories, administrators can create, manage, and publish content.

💡 提示

单击搜索图标

¥Click the search icon

Search icon

在子导航中使用文本搜索并更快地找到你的内容类型之一!

¥in the sub navigation to use a text search and find one of your content-types more quickly!

集合类型

¥Collection types

内容管理器的集合类型类别显示可用集合类型的列表,可从

¥The Collection types category of the Content Manager displays the list of available collection types which are accessible from the

Content icon

内容管理器子导航。

¥Content Manager sub navigation.

对于每个可用的集合类型,可以创建多个条目,这就是每个集合类型分为 2 个接口的原因:列表视图和编辑视图(参见 写作内容)。

¥For each available collection type multiple entries can be created which is why each collection type is divided into 2 interfaces: the list view and the edit view (see Writing content).

集合类型的列表视图显示为该集合类型创建的所有条目。

¥The list view of a collection type displays all entries created for that collection type.

List view of a collection type in the Content ManagerList view of a collection type in the Content Manager

从列表视图中,可以:

¥From the list view, it is possible to:

  • 创建一个新条目 (1),

    ¥create a new entry (1),

  • 进行文本搜索 (2) 或设置过滤器 (3) 来查找特定条目,

    ¥make a textual search (2) or set filters (3) to find specific entries,

  • 如果安装了 国际化插件,则按区域设置过滤以仅显示在所选区域设置中翻译的条目 (4),

    ¥if the Internationalization plugin is installed, filter by locale to display only the entries translated in a chosen locale (4),

  • 配置列表视图表格中显示的字段 (5),

    ¥configure the fields displayed in the table of the list view (5),

  • edit

Edit icon

(见 写作内容),重复

¥(see Writing content), duplicate

Duplicate icon

,或删除

¥, or delete

Delete icon

(见 删除内容)一个条目,

¥(see Deleting content) an entry,

💡 提示

可以为列表视图表中显示的大多数字段启用排序(请参阅 配置内容类型的视图)。单击表标题中的字段名称可对该字段进行排序。

¥Sorting can be enabled for most fields displayed in the list view table (see Configuring the views of a content-type). Click on a field name, in the header of the table, to sort on that field.

过滤条目

¥Filtering entries

在列表视图表格的正上方,界面的左侧,会显示一个“过滤器”按钮。它允许设置一个或多个基于条件的过滤器,这些过滤器相互叠加(即,如果你设置多个条件,则仅显示与所有条件匹配的条目)。

¥Right above the list view table, on the left side of the interface, a Filters button is displayed. It allows to set one or more condition-based filters, which add to one another (i.e. if you set several conditions, only the entries that match all the conditions will be displayed).

Filters in the Content ManagerFilters in the Content Manager

要设置新过滤器:

¥To set a new filter:

  1. 单击“过滤器”按钮。

    ¥Click on the Filters button.

  2. 单击第一个下拉列表以选择要应用条件的字段。

    ¥Click on the 1st drop-down list to choose the field on which the condition will be applied.

  3. 单击第二个下拉列表以选择要应用的条件类型。

    ¥Click on the 2nd drop-down list to choose the type of condition to apply.

  4. 在剩余文本框中输入条件值。

    ¥Enter the value(s) of the condition in the remaining textbox.

  5. 单击添加过滤器按钮。

    ¥Click on the Add filter button.

✏️ 注意

激活后,过滤器将显示在“过滤器”按钮旁边。可以通过单击删除图标将其删除

¥When active, filters are displayed next to the Filters button. They can be removed by clicking on the delete icon

Clear icon

.

创建新条目

¥Creating a new entry

在列表视图界面的右上角,会显示“添加新条目”按钮。它允许为你的集合类型创建一个新条目。

¥On the top right side of the list view interface, an Add new entry button is displayed. It allows to create a new entry for your collection type.

单击新条目按钮会将你重定向到编辑视图,你可以在其中编写新条目的内容(参见 写作内容)。

¥Clicking on the new entry button will redirect you to the edit view, where you will be able to write the content of the new entry (see Writing content).

✏️ 注意

仅当新条目的某些内容被写入并保存一次后,才被视为已创建。只有这样,新条目才会在列表视图中列出。

¥New entries are only considered created once some of their content has been written and saved once. Only then will the new entry be listed in the list view.

配置表字段

¥Configuring the table fields

列表视图表格上方右侧有一个设置按钮

¥Above the list view table, on the right, a settings button

Cog icon

被展示。它允许临时选择要在表中显示的字段或访问永久视图设置。

¥is displayed. It allows to temporarily choose which fields to display in the table or to access permanent view settings.

✏️ 注意

通过下面详细介绍的方式配置表格的显示字段只是临时的:刷新页面或在内容管理器外部导航时,配置将立即重置。对于永久配置,点击设置按钮进入列表视图配置界面

¥Configuring the displayed field of the table in the way detailed below is only temporary: the configurations will be reset as soon as the page is refreshed or when navigating outside the Content Manager. For permanent configurations, go to the list view configuration interface by clicking on the settings button

Cog icon

并单击“配置视图”按钮(参见 配置内容类型的视图)。

¥and clicking on the Configure the view button (see Configuring the views of a content-type).

Displayed fields in the settings of a list view in the Content ManagerDisplayed fields in the settings of a list view in the Content Manager

要临时配置表中显示的字段:

¥To temporarily configure the fields displayed in the table:

  1. 单击设置按钮

    ¥Click on the settings button

Cog icon

. 2.勾选与要在表中显示的字段关联的框。3.

¥. 2. Tick the boxes associated with the field you want to be displayed in the table. 3. Untick the boxes associated with the fields you do not want to be displayed in the table.

💡 提示

关系字段也可以显示在列表视图中。有关其特性的更多信息,请参阅 配置内容类型的视图

¥Relational fields can also be displayed in the list view. Please refer to Configuring the views of a content-type for more information on their specificities.

单一类型

¥Single types

内容管理器的单一类型类别显示可用单一类型的列表,可从

¥The Single types category of the Content Manager displays the list of available single types, which are accessible from the

Content icon

内容管理器子导航。

¥Content Manager sub navigation.

与具有多个条目的集合类型不同,单个类型不是为多种用途而创建的。换句话说,每种可用的单一类型只能有一个默认条目。因此,单一类型类别中没有列表视图。

¥Unlike collection types which have multiple entries, single types are not created for multiple uses. In other words, there can only be one default entry per available single type. There is therefore no list view in the Single types category.

单击单个类型将直接将你重定向到编辑视图,你可以在其中编写单个类型的内容(参见 写作内容)。

¥Clicking on a single type will directly redirect you to the edit view, where you will be able to write the content of your single type (see Writing content).

Single type in the Content ManagerSingle type in the Content Manager