protected virtual AdaptiveTreeMacroSettingsItem GetAdaptiveTreeMacroSettingsItem(XElement element, string name, UrlString parameters, string value) { Item item = null; if (!string.IsNullOrEmpty(this.SettingsItemId) && ID.IsID(this.SettingsItemId)) { var id = new ID(this.SettingsItemId); item = Sitecore.Client.ContentDatabase.GetItem(id); } if (item == null) { item = RuleHelper.GetItemFromParameters("settings", element, parameters); } AdaptiveTreeMacroSettingsItem item2 = item; return(item2); }
protected virtual SelectItemOptions GetSelectItemOptions(AdaptiveTreeMacroSettingsItem item) { var options = new SelectItemOptions(); options.ResultType = SelectItemOptions.DialogResultType.Id; if (item != null) { options.ShowRoot = item.ShowRoot; options.IncludeTemplatesForDisplay = item.IncludeTemplatesForDisplay; options.IncludeTemplatesForSelection = item.IncludeTemplatesForSelection; options.Title = item.WindowTitle; options.Text = item.WindowText; options.Icon = item.Icon; } else { options.Title = this.DefaultWindowTitle; options.Text = this.DefaultWindowText; options.Icon = this.DefaultWindowIcon; } return(options); }