Skip to content

页面发布工作流程-Page publishing workflow

ARCHIVED

!注意“归档”

This chapter has not been updated for the current version of Orchard, and has been ARCHIVED.

Published version

发布版本

A page can be published (publicly accessible) or not. When a page is first created, for example, it is not yet published.

页面可以发布(可公开访问)或不发布。例如,首次创建页面时,它尚未发布。

Technically, unpublishing (taking pages offline) is done by Orchard by setting the IsOnline bit in the database record for the page to zero.

从技术上讲,Orchard通过将页面的数据库记录中的IsOnline位设置为零来完成取消发布(使页面脱机)。

Draft version

草稿版本

A page can have a draft version, which is a version that is not yet publicly available. Any modifications done on the draft version are without effect on the version of the page that is currently published (if there is one). The draft version exists precisely so that the page can be modified without affecting the version that the public sees.

页面可以具有草稿版本,该版本是尚未公开的版本。对草稿版本所做的任何修改都不会影响当前发布的页面版本(如果有的话)。草稿版本的存在恰好可以修改页面而不会影响公众看到的版本。

A draft of any page is technically created by copying its row in the database to a new one with the IsDraft bit set to one. Publishing the draft is done by copying all data from the draft back into the published page row (except for id and the published bit) and deleting the draft row.

从技术上讲,通过将数据库中的行复制到IsDraft位设置为1的新行来创建任何页面的草稿。通过将草稿中的所有数据复制回已发布的页面行(id和已发布的位除外)并删除草稿行来完成发布草稿。

Technically, the database and model allow for the following states for a page:

从技术上讲,数据库和模型允许页面的以下状态:

  • Not created yet (no record)

  • 尚未创建(没有记录) *

  • Published does not exist, but there is a draft

  • 发布不存在,但有一个草案 *

  • Not published, no draft

  • 没有发表,没有草案 *

  • Not published, draft exists

  • 尚未发布,草案存在 *

  • Published, no draft

  • 发表,没有草案 *

  • Published, draft exists

  • 已发布,草案存在 *

This is simplified for the end user by only having a few possible actions in the admin UI that define the transitions between possible page states:

通过在管理界面中仅有几个可能的操作来定义可能的页面状态之间的转换,这为最终用户简化了:

  • Create

  • 创建 *

  • Publish

  • 发布 *

  • Unpublish

  • 取消发布 *

  • Edit

  • 编辑 *

  • Revert

  • 还原 *

Here is a diagram of the state transitions:

这是状态转换的图表:

Publication workflow

The page list displays information about the existence of a draft using a torn page icon, and shows whether the page is online (published) or not using a check icon. The only actions that can be taken from this page are in the actions column.

页面列表显示有关使用撕裂页面图标存在草稿的信息,并使用检查图标显示页面是否在线(已发布)。可以从此页面执行的唯一操作位于actions列中。

The view action navigates to the currently published version (if there is one).

视图操作导航到当前发布的版本(如果有)。

Edit goes to the edit page.

编辑进入编辑页面。

Delete deletes both draft and published page.

删除删除草稿页面和已发布页面。

List of pages