我已从Sitecore 8.1升级到Sitecore 8.2。我有一个方法,我正在使用:
Sitecore.Context.PageMode.IsPageEditor
为此,它给出了错误:
attempt by method METHOD_NAME to access method 'Sitecore.Context+PageMode.get_IsPageEditor()' failed.
我错过了什么?
答案 0 :(得分:6)
Sitecore.Context.PageMode.IsPageEditor
Sitecore.Kernel中已弃用,因为Sitecore 8.0 Update-6会看到release notes:
已弃用和已删除的功能
属性IsPageEditor,IsPageEditorDesigning和 来自Sitecore的类Context.PageMode中的IsPageEditorEditing 命名空间已被弃用,以支持新引入的 属性IsExperienceEditor和IsExperienceEditorEditing。旧 属性将在未来的主要版本之一中删除。 (438475)
在Sitecore 8.2 update 1中,删除了Sitecore.Context.PageMode.IsPageEditor 使用
Sitecore.Context.PageMode.IsExperienceEditor
同样的:
IsPageEditor, Obsolete Use IsExperienceEditor instead
IsPageEditorClassic, Deprecated always false
IsPageEditorDesigning, Obsolete Use IsExperienceEditorEditing instead
IsPageEditorEditing, Obsolete Use IsExperienceEditorEditing instead
IsPageEditorNavigating, Deprecated always false