Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoComponentRenderer

    Methods used to render umbraco components as HTML in templates

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Templates
    Assembly: Umbraco.Core.dll
    Syntax
    public class UmbracoComponentRenderer : IUmbracoComponentRenderer
    Remarks

    Used by UmbracoHelper

    Constructors

    View Source

    UmbracoComponentRenderer(ITemplateRenderer)

    Initializes a new instance of the UmbracoComponentRenderer class.

    Declaration
    public UmbracoComponentRenderer(ITemplateRenderer templateRenderer)
    Parameters
    Type Name Description
    ITemplateRenderer templateRenderer

    Methods

    View Source

    RenderTemplateAsync(Int32, Nullable<Int32>)

    Renders the template for the specified pageId and an optional altTemplateId

    Declaration
    public async Task<IHtmlEncodedString> RenderTemplateAsync(int contentId, int? altTemplateId = null)
    Parameters
    Type Name Description
    System.Int32 contentId

    The content id

    System.Nullable<System.Int32> altTemplateId

    If not specified, will use the template assigned to the node

    Returns
    Type Description
    Task<IHtmlEncodedString>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • UmbracoComponentRenderer(ITemplateRenderer)
    • Methods
      • RenderTemplateAsync(Int32, Nullable<Int32>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX