Hide

YetaWF.Core Package Documentation

Display
Print

YetaWF.Core.Modules.ModuleDefinitionExtensions.RenderModuleAsync Method

Renders a non-unique module. This is typically used in pages to use or create modules, which are not part of a pane.

Class: YetaWF.Core.Modules.ModuleDefinitionExtensions
Namespace: YetaWF.Core.Modules
Assembly: YetaWF.Core

Syntax

public static Task<string> RenderModuleAsync<TYPE>(
    this YHtmlHelper htmlHelper,
    Guid moduleGuid,
    Action<TYPE>? initModule = null );

Parameters

htmlHelper

The HtmlHelper instance.

moduleGuid

The module Guid of the module to render. If the module doesn't exist, it is created.

initModule

An optional callback to initialize the module if it is a new module. This is called after the module has been created. The action parameter is the module instance.

Return Value

The module rendered as HTML.

See Also YetaWF.Core.Modules.ModuleDefinitionExtensions ClassYetaWF.Core Overview