Hide

YetaWF.Core Package Documentation

Display
Print

YetaWF.Core.Modules.ModuleDefinitionExtensions.RenderUniqueModuleAsync Method

Renders a unique module. This is typically used in pages to use or create unique 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> RenderUniqueModuleAsync<TYPE>(
    this YHtmlHelper htmlHelper,
    Action<TYPE>? initModule = null );
public static Task<string> RenderUniqueModuleAsync(
    this YHtmlHelper htmlHelper,
    string packageName,
    string typeName,
    Action<ModuleDefinition>? initModule = null );

Parameters

htmlHelper

The HtmlHelper instance.

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.

packageName

The name of the package implementing the module.

typeName

The fully qualified type name of the module.

Return Value

The module rendered as HTML.

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