Class ViewCustomizableComponentDefinition
- Namespace
- Kentico.PageBuilder.Web.Mvc
- Assembly
- Kentico.Content.Web.Mvc.dll
Base class for component definitions which can use custom views and view components for their render.
public abstract class ViewCustomizableComponentDefinition : ComponentDefinition, IComponentDefinition
- Inheritance
-
objectViewCustomizableComponentDefinition
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
ViewCustomizableComponentDefinition()
Creates an instance of ViewCustomizableComponentDefinition class.
protected ViewCustomizableComponentDefinition()
ViewCustomizableComponentDefinition(string, string, string, string, string, Type)
Creates a definition of a simple component which uses a custom view for rendering.
protected ViewCustomizableComponentDefinition(string identifier, string customViewName, string name, string description, string iconClass, Type defaultControllerType)
Parameters
identifier
stringUnique identifier of the component definition.
customViewName
stringCustom view name for the registered component. If not specified, the default system view name in format '~/Shared/{ComponentType}/_{identifier}' is used.
name
stringName of the registered component.
description
stringDescription of the registered component.
iconClass
stringFont-icon CSS class of the registered component.
defaultControllerType
TypeType of the controller that is responsible for returning component's markup in the edit mode.
Remarks
Component without a controller is a syntactical sugar to ease the implementation, however, there still must exist a controller that returns the component's markup in the edit mode of Page builder.
ViewCustomizableComponentDefinition(string, Type, string, string, string, Type)
Creates a definition of a simple component which uses a custom view component for rendering.
protected ViewCustomizableComponentDefinition(string identifier, Type viewComponentType, string name, string description, string iconClass, Type defaultControllerType)
Parameters
identifier
stringUnique identifier of the component definition.
viewComponentType
TypeCustom view component type for the registered component.
name
stringName of the registered component.
description
stringDescription of the registered component.
iconClass
stringFont-icon CSS class of the registered component.
defaultControllerType
TypeType of the controller that is responsible for returning component's markup in the edit mode.
Remarks
Component without a controller is a syntactical sugar to ease the implementation, however, there still must exist a controller that returns the component's markup in the edit mode of Page builder.
Properties
DefaultViewSubFolderName
Folder used to locate the view when specific path is not provided via constructor.
protected abstract string DefaultViewSubFolderName { get; }
Property Value
- string
IsCustom
Indicates whether specific view was provided via constructor, or the system should look for the view in default location.
public bool IsCustom { get; }
Property Value
- bool
ViewComponentType
Type of the view component to be rendered.
public Type ViewComponentType { get; }
Property Value
- Type
ViewPath
Path of the view to be rendered.
public string ViewPath { get; }
Property Value
- string