Gets the root page view model for the specified site and culture.

public static async Task<INodeViewModel<TModel>> RootAsync<TModel>(IRedaktContext context, INodeCollection forCollection, Nullable<CultureInfo> forCulture) where TModel : Redakt.ContentManagement.Content.IContentType
Returns:
Task<INodeViewModel<TModel>>

Parameters

The current IRedaktContext.

forCollection INodeCollection

The site to get the root page for, or null to get the root page for the current request site.

forCulture Nullable<CultureInfo>

The culture for the root page, or null to use the current request culture.

Type Parameters

TModel IContentType

The root page model type. Must implement IContentType.

In this article