public override object Execute(ParameterList parameters, FunctionContextContainer context) { if (PageRenderer.RenderingReason == RenderingReason.BuildSearchIndex) { return(null); } string featureName = parameters.GetParameter <string>("FeatureName"); return(PageTemplateFeatureFacade.GetPageTemplateFeature(featureName)); }
/// <exclude /> protected override void OnInit(System.EventArgs e) { XhtmlDocument feature = PageTemplateFeatureFacade.GetPageTemplateFeature(this.Name); FunctionContextContainer functionContextContainer = PageRenderer.GetPageRenderFunctionContextContainer(); var markup = new Markup(feature.Root, functionContextContainer); Controls.Add(markup); base.OnInit(e); }
public override object Execute(ParameterList parameters, FunctionContextContainer context) { string featureName = parameters.GetParameter <string>("FeatureName"); return(PageTemplateFeatureFacade.GetPageTemplateFeature(featureName)); }
public IHtmlString GetPageTemplateFeature(string featureName) { var root = PageTemplateFeatureFacade.GetPageTemplateFeature(featureName).Root; return(root == null ? MvcHtmlString.Empty : _helper.Raw(root.ToString())); }
/// <summary> /// Includes a named Page Template Feature. Page Template Feature are managed in '~/App_Data/PageTemplateFeatures' /// or via the C1 Console's Layout perspective. They contain html and functional snippets. /// </summary> /// <param name="featureName">Name of the Page Template Feature to include. Names do not include an extension.</param> /// <returns></returns> public IHtmlString GetPageTemplateFeature(string featureName) { XElement documentRoot = PageTemplateFeatureFacade.GetPageTemplateFeature(featureName).Root; return(_helper.Raw(documentRoot.ToString())); }