RenderSection(string, Func<dynamic, HelperResult>) Method
Renders the content of the specified section if it's defined. If the section is not defined, renders the provided content.
Namespace
Statiq.Razor
Containing Type
StatiqRazorPage<TModel>

Syntax

public IHtmlContent RenderSection(string name, Func<dynamic, HelperResult> defaultContents)

Parameters

Name Type Description
name string The name of the section to render.
defaultContents Func<dynamic, HelperResult> The default content to render if the section is not defined.

Return Value

Type Description
IHtmlContent The HTML content.