Sitecore データベース全体 (master、web、または pub) をすばやく簡単にクエリして、アイテムのテンプレートが存在しなくなった場所を特定する方法を探しています。
ツリー全体をシリアル化しようとしていますが、テンプレートが削除された多くのアイテムがあり、あまり頭を悩ませずにそれらのリストを取得したいと考えています。
これらのアイテムを表示すると、「テンプレート: テンプレートはもう存在しません。これをレンダリングするコードは次のとおりです」と表示されます
private static void RenderQuickInfoTemplate(HtmlTextWriter output, Sitecore.Data.Items.Item item)
{
Sitecore.Data.Items.Item item2;
Sitecore.Diagnostics.Assert.ArgumentNotNull(output, "output");
Sitecore.Diagnostics.Assert.ArgumentNotNull(item, "item");
output.Write("<tr><td>");
output.Write(Translate.Text("Template:"));
output.Write("</td><td>");
using (new SecurityDisabler())
{
item2 = item.Database.GetItem(item.TemplateID);
}
bool flag = (item2 != null) && (CommandManager.QueryState("shell:edittemplate", item) == CommandState.Enabled);
if (flag)
{
output.Write("<a href=\"#\" onclick=\"javascript:scForm.postRequest('','','','shell:edittemplate');return false\">");
}
if (item2 != null)
{
output.Write(item2.Paths.Path);
}
else
{
output.Write(Translate.Text("[template no longer exists]"));
}
ありがとう