public ICustomNavigationItem GetNavigationItem(Guid itemId, ICustomNavigationItemConfiguration configuration) { int groupId; if (!int.TryParse(HttpUtility.ParseQueryString(configuration.GetStringValue("group", ""))["Group"], out groupId)) { return(null); } if (groupId <= 0) { var group = CoreContext.Instance().CurrentGroup; if (group != null) { groupId = group.ID; } else { return(null); } } string label = configuration.GetStringValue("label", ""); if (string.IsNullOrEmpty(label)) { label = translationController.GetLanguageResourceValue("configuration_defaultLabel"); } return(new CustomNavigationItem(Id, () => GetNavigationLabel(groupId, label), () => GetNavigationUrl(groupId), (int userId) => GetIsVisible(groupId, userId, Configuration), () => TEApi.Url.CurrentContext.ApplicationTypeId == Id) { Configuration = configuration, Plugin = this, CssClass = "sharepoint-libraries" }); }