示例#1
0
        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);
        }
示例#3
0
        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()));
        }
示例#5
0
        /// <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()));
        }