我有以下代码块,用于检索 kentico 中的文档节点并将其删除。它确实会删除 kentico 节点,但不会删除保留在数据集中的基础文档类型。帮助?!
CMS.TreeEngine.TreeProvider provider = new CMS.TreeEngine.TreeProvider(CMS.CMSHelper.CMSContext.CurrentUser);
CMS.TreeEngine.TreeNode image = provider.SelectSingleNode(new Guid(imageID), "en-US", CMS.CMSHelper.CMSContext.CurrentSite.SiteName);
if (image != null)
{
CMS.TreeEngine.TreeNode school = provider.SelectSingleNode(image.Parent.NodeID, "en-US", true, true);
if (school != null)
{
string CMSUserID = school.GetValue("CMSUserID").ToString();
if (CMSUserID == ui.UserID.ToString())
{
image.Delete(false);
}
}
}