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
helperViewModelTemplateHelperThe ViewModelTemplateHelper instance used to retrieve the current user.
userUserViewModelWhen this method returns, contains the UserViewModel value, if the current user exists, otherwise
null.
Returns
- bool
trueifuseris not null, otherwisefalse
Exceptions
- ArgumentNullException
Thrown when the
helperis null.