Beispiel #1
0
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            // Render out inner content
            output.TagName = null;
            var content = output.Content.GetContent();

            output.Content.SetHtmlContent(content);
            // restore previous context
            PartialWidgetPageHelper.RestoreContext(PreservedContext);
        }
Beispiel #2
0
        public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
        {
            // Render out inner content
            output.TagName = null;
            var content = await output.GetChildContentAsync();

            output.Content.SetHtmlContent(content.GetContent());
            // restore previous context
            PartialWidgetPageHelper.RestoreContext(PreservedContext);
        }
Beispiel #3
0
 public override void Init(TagHelperContext context)
 {
     // Preserve Context
     PreservedContext = PartialWidgetPageHelper.GetCurrentContext();
     // Change context
     if (InitializeDocumentPrior)
     {
         if (Page != null)
         {
             PartialWidgetPageHelper.ChangeContext(Page);
         }
         else if (Documentid > 0)
         {
             PartialWidgetPageHelper.ChangeContext(Documentid);
         }
     }
     else
     {
         PartialWidgetPageHelper.ChangeContext();
     }
     base.Init(context);
 }