Пример #1
0
        private static string defaultProductMenuCollection()
        {
            DynamicNode     settingsRoot;
            DynamicNodeList webConfigSettings;

            if (NodeFacade.settingsRoot(out settingsRoot))
            {
                if (settingsRoot.HasDescendantsOfType("WebConfig", out webConfigSettings))
                {
                    return(webConfigSettings.First().SafeProperty("defaultProductMenuCollection") ?? string.Empty);
                }
            }
            return(string.Empty);
        }
Пример #2
0
        /// <summary>
        /// Get the header theme to be used for the page.
        /// There is a site setting  Settings > WebConfig.headerTheme , which can be overriden at the page level.
        /// </summary>
        /// <returns>header theme (CSS class name) to be used in a "header" element</returns>
        private static string headerTheme()
        {
            DynamicNode     settingsRoot;
            DynamicNodeList webConfigSettings;

            if (NodeFacade.settingsRoot(out settingsRoot))
            {
                if (settingsRoot.HasDescendantsOfType("WebConfig", out webConfigSettings))
                {
                    return(webConfigSettings.First().SafeProperty("headerTheme") ?? string.Empty);
                }
            }
            return(string.Empty);
        }
Пример #3
0
        private static bool fetchComplianceGroups(out DynamicNodeList complianceGroups)
        {
            DynamicNode settingsRoot;

            if (NodeFacade.settingsRoot(out settingsRoot))
            {
                if (settingsRoot.HasDescendantsOfType("ComplianceGroup", out complianceGroups))
                {
                    return(true);
                }
            }

            complianceGroups = null;
            return(false);
        }
Пример #4
0
        /// <summary>
        ///     Settings > Compliance Lists Folder > .Children
        /// </summary>
        /// <returns>
        ///     Returns a DynamicNodeList which contains the DynamicNodes that represent the user compliance lists
        ///     Each DynamicNode is a compliance list, which can be extracted using GetPropertyValue("compliance")
        /// </returns>
        private static DynamicNodeList getUserLists()
        {
            DynamicNode     settingsRoot;
            DynamicNodeList complianceListFolder;
            DynamicNodeList userLists = new DynamicNodeList(); // returned

            if (NodeFacade.settingsRoot(out settingsRoot))
            {
                if (settingsRoot.HasDescendantsOfType("ComplianceListsFolder", out complianceListFolder))
                {
                    userLists = complianceListFolder.First().Children;
                }
            }
            return(userLists);
        }