Table of Contents

Class Render

Namespace
ToSic.Sxc.Blocks
Assembly
ToSic.Sxc.Dnn.Core.dll

Block-Rendering system. It's responsible for taking a Block and delivering HTML for the output.
It's used for InnerContent, so that Razor-Code can easily render additional content blocks.
See also Inner Content (Content Within Other Content)

[InternalApi_DoNotUse_MayChangeWithoutNotice]
[Obsolete("Deprecated in v12 - please use IRenderService instead - will not work in v12 Base classes like Razor12")]
public class Render
Inheritance
Render

Methods

All(DynamicEntity, NoParamOrder, string, string, int, string)

Render content-blocks into a larger html-block containing placeholders

public static IRawHtmlString All(DynamicEntity parent, NoParamOrder noParamOrder = default, string field = null, string apps = null, int max = 100, string merge = null)

Parameters

parent DynamicEntity

The parent-item containing the content-blocks and providing edit-context

noParamOrder NoParamOrder

see Convention: Named Parameters

field string

Required: Field containing the content-blocks.

apps string

BETA / WIP

max int

BETA / WIP

merge string

Optional: html-text containing special placeholders.

Returns

IRawHtmlString

Remarks

  • Changed result object to IRawHtmlString in v16.02 from IHybridHtmlString

One(DynamicEntity, NoParamOrder, ICanBeEntity, string, Guid?)

Render one content block This is accessed through DynamicEntity.Render() At the moment it MUST stay internal, as it's not clear what API we want to surface

public static IRawHtmlString One(DynamicEntity parent, NoParamOrder noParamOrder = default, ICanBeEntity item = null, string field = null, Guid? newGuid = null)

Parameters

parent DynamicEntity

The parent-item containing the content-blocks and providing edit-context

noParamOrder NoParamOrder

see Convention: Named Parameters

item ICanBeEntity

The content-block item to render. Optional, by default the same item is used as the context.

field string

Optional:

newGuid Guid?

Internal: this is the guid given to the item when being created in this block. Important for the inner-content functionality to work.

Returns

IRawHtmlString

Remarks

  • Changed result object to IRawHtmlString in v16.02 from IHybridHtmlString