如何以编程方式隐藏 sitecore 中的项目:
这是我到目前为止所尝试的:
Item recordDetails = root.Add(object.Name + " Details", folderTemplate);
recordDetails.Fields.ReadAll();
recordDetails.Editing.BeginEdit();
CheckboxField recordHidden = recordDetails.Fields["Hidden"];//Also tried "isHidden"
if (recordHidden != null)
{
recordHidden.Checked = true;
}
recordDetails.Editing.EndEdit();
但是没有运气,有什么想法吗?