Table of Contents

Class ContentViewModelTemplateHelperExtensions

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll

Provides extension methods for view model templates through ViewModelTemplateHelper.

public static class ContentViewModelTemplateHelperExtensions
Inheritance
ContentViewModelTemplateHelperExtensions
Inherited Members

Methods

TryGetCurrentUser(ViewModelTemplateHelper, out UserViewModel?)

Returns true if the current user's view model is assigned to the passed out parameter.

public static bool TryGetCurrentUser(this ViewModelTemplateHelper helper, out UserViewModel? user)

Parameters

helper ViewModelTemplateHelper

The ViewModelTemplateHelper instance used to retrieve the current user.

user UserViewModel

When this method returns, contains the UserViewModel value, if the current user exists, otherwise null.

Returns

bool

true if user is not null, otherwise false

Exceptions

ArgumentNullException

Thrown when the helper is null.

To top