How to determine in sitecore whether given item is start item?
问题 In config file we set start item for each website in element (e.g. startItem="/Home"). And we also can select start item in code. But what I am asking about is how to determine for any selected item whether it is start item or not? At least we can select start item and compare with given item, but it is not elegant code I think 回答1: We typically have an extension method on the SiteContext class to get the Home Item: public static class SiteExtensions { public static Item GetHomeItem(this