Skip to main content

内容管理器简介

¥Introduction to the Content Manager

Content Manager 是 Strapi 的核心功能。它始终默认启用,无法禁用。当应用处于开发和生产环境中时都可以访问它。

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

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

¥The Content Manager is accessible from 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 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 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,

  • 如果启用了 国际化(i18n),则按语言环境进行过滤,以仅显示所选语言环境中的条目 translated 4

    ¥if Internationalization (i18n) is enabled, 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,

  • 如果启用了 起草并发布,则查看每个条目的状态 6

    ¥if Draft & Publish is enabled, see the status of each entry 6,

  • 通过单击行末的 7 对特定条目执行操作:

    ¥perform actions on a specific entry by clicking on 7 at the end of the row:

Delete locale icon

删除给定语言环境,

¥delete a given locale,

提示

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

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

创建新条目

¥Creating a new entry

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

¥On the top right side of the list view interface, an Create 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 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 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 .

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