Table of Contents

Class ComponentViewModel

Namespace
Kentico.PageBuilder.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

View model for a component without properties.

public class ComponentViewModel
Inheritance
object
ComponentViewModel
Derived
Extension Methods

Constructors

ComponentViewModel()

public ComponentViewModel()

Properties

CacheDependencies

Provides access to the cache dependencies of components that support output caching.

public ICacheDependencies CacheDependencies { get; }

Property Value

ICacheDependencies

Remarks

Caching is supported for widgets only.

See Also

Page

Page where the component is placed.

public RoutedWebPage Page { get; }

Property Value

RoutedWebPage

Methods

Create(RoutedWebPage)

Creates a new instance of a ComponentViewModel.

public static ComponentViewModel Create(RoutedWebPage page)

Parameters

page RoutedWebPage

Represents a document on which this view model is used for a Page builder component.

Returns

ComponentViewModel

Remarks

Method should be used in case of rendering a Page builder component with only the view. In that case by convention the view model of type ComponentViewModel is passed to the view.