Class RegisterFormSectionAttribute
Registers a section to Form builder.
public sealed class RegisterFormSectionAttribute : RegisterComponentAttribute, IPreInitAttribute
- Inheritance
-
objectAttributeRegisterFormSectionAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
RegisterFormSectionAttribute(string, string, string)
Creates an instance of the RegisterFormSectionAttribute class.
public RegisterFormSectionAttribute(string identifier, string name, string customViewName = null)
Parameters
identifierstringUnique identifier of the form section definition.
namestringName of the registered form section.
customViewNamestringCustom view name for the registered form section. If not specified, the default system view name in format '~/Shared/Sections/_{identifier}' is used.
Remarks
Make sure to provide unique identifier for the section definition from the start. This identifier is used within the page configuration and any further change can lead to incorrect configuration load. Consider specifying identifier in format 'CompanyName_ModuleName_SectionName', e.g. 'Kentico_Content.SingleColumn'.
Use this attribute when simple section is being developed and no custom controller is needed.
RegisterFormSectionAttribute(string, Type, string)
Registers a simple form section using a view component.
public RegisterFormSectionAttribute(string identifier, Type viewComponentType, string name)
Parameters
identifierstringUnique identifier of the section.
viewComponentTypeTypeCustom view component type for the registered section.
namestringName of the registered section.
Remarks
Make sure to provide unique identifier for the section definition from the start. This identifier is used within the page configuration and any further change can lead to incorrect configuration load. Consider specifying identifier in format 'CompanyName_ModuleName_SectionName', e.g. 'Kentico_Content_SingleColumn'.
Properties
Description
Description of the registered section.
public string Description { get; set; }
Property Value
- string
IconClass
Font-icon CSS class of the registered section.
public string IconClass { get; set; }
Property Value
- string
PropertiesType
Type of the section properties model. The type needs to implement the IFormSectionProperties interface.
public Type PropertiesType { get; set; }
Property Value
- Type
Methods
PreInit()
Registers the section definition during application pre-initialization.
public override void PreInit()