1

当 Sitecore 用户打开未处于工作流最终状态的项目时,在黄色背景上的“快速信息”区域顶部会显示

If you publish now, the selected version will not be visible on the Web site because it is not in the final workflow step.

对于处于某些工作流程状态的项目,有没有办法可以避免这种情况发生。

4

1 回答 1

5

生成此警告的代码位于<getContentEditorWarnings>管道中。虽然我同意严的观点;仅仅因为你可以,并不意味着你应该 - 这将是你需要去的地方。我不确定那里的哪些处理器会生成您的特定警告,但是您可以使用 Reflector 进行挖掘,或者只是将它们一一注释掉,直到它消失。

您更有可能希望在此处编写特定步骤,以根据您描述的业务规则生成警告。

管道看起来像这样(在 Sitecore 7 中)

<getContentEditorWarnings>
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.ItemNotFound, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.CanReadLanguage, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.HasNoVersions, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.CanWrite, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.CanWriteWorkflow, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.CanWriteLanguage, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.IsReadOnly, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.IsLocked, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.HasNoFields, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.NeverPublish, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.ItemPublishingRestricted, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.VersionPublishingRestricted, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.ShowingInputBoxes, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.FeedIsEmpty, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.RunRules, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.GetContentEditorWarnings.Notifications, Sitecore.Kernel" />
</getContentEditorWarnings>

您可以在此处找到 John West 关于如何为此管道编写新警告的帖子。

于 2013-09-12T08:50:17.700 回答