internal static IEnumerable <ParameterProfile> BuildInlineXhtmlEditorParameters()
        {
            // TODO: localize
            var templateSelectorWidget = StandardWidgetFunctions.DropDownList(
                typeof(VisualXhtmlEditorFuntion), StaticReflection.GetMethodInfo(() => PageTemplates()).Name, "Key", "Value", false, false);

            yield return(new ParameterProfile(PreviewTemplateIdParameterName,
                                              typeof(Guid), false,
                                              new ConstantValueProvider(Guid.Empty),
                                              templateSelectorWidget,
                                              null,
                                              "Page template for preview",
                                              new HelpDefinition("Page template to be used while generating preview images for the C1 functions calls.")));

            yield return(new ParameterProfile(PreviewPlaceholderParameterName,
                                              typeof(string), false,
                                              new ConstantValueProvider(null), StandardWidgetFunctions.TextBoxWidget, null,
                                              "Page placeholder for preview",
                                              new HelpDefinition("Page placeholder to be used while generating preview images for the C1 functions calls. If not specified, the default placeholder for the selected template will be used.")
                                              ));

            yield return(new ParameterProfile(PreviewPageIdParameterName,
                                              typeof(Guid), false,
                                              new ConstantValueProvider(Guid.Empty),
                                              StandardWidgetFunctions.GetDataReferenceWidget <IPage>(),
                                              null,
                                              "Page for preview",
                                              new HelpDefinition("Page template to be used while generating preview images. Certain fuctions may require page information for previewing.")));
        }
示例#2
0
        private void SetParameterProfiles()
        {
            WidgetFunctionProvider dropDown = StandardWidgetFunctions.DropDownList(GetType(), nameof(GetAssociationPageRestrictions), "Key", "Value", false, true);

            AddParameterProfile(
                new ParameterProfile(
                    typeof(SitemapScope).Name,
                    typeof(SitemapScope),
                    true,
                    new ConstantValueProvider(SitemapScope.Current),
                    dropDown,
                    null,
                    "Sitemap scope",
                    new HelpDefinition(Resources.default_text.SelectFilteredDataWidgetFuncSitescopeHelp)));
        }