/// <summary> /// Retrieves a list of items that are part of the Sites meta navigation. /// </summary> /// <returns></returns> public static ICollection <Item> GetMetaNavigation(Item startItem = null) { if (startItem == null) { startItem = SitecoreHelper.SiteHomeItem(); } return(startItem.Children.Where(x => x.TemplateName == Statics.TemplateNames.ContentPage && !((CheckboxField)x.Fields[Statics.FieldNames.ExcludeFromNavigation]).Checked).ToList()); }
public static Item GetHomeReferenceItem(string fieldName) { ReferenceField reference = SitecoreHelper.SiteHomeItem().Fields[fieldName]; if (reference != null) { return(reference.TargetItem); } return(null); }