Class PlugInPropertyAttribute
Defines that a class contains settings editable from admin mode in plug-in manager.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.PlugIn
Assembly: EPiServer.dll
Version: 8.11.0Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class PlugInPropertyAttribute : Attribute, _Attribute
Examples
Adding a setting for changing the root page for a special function.
Adding a setting for a boolean value with a checkbox as GUI.
Constructors
PlugInPropertyAttribute()
Initializes a new instance of the PlugInPropertyAttribute class.
Declaration
public PlugInPropertyAttribute()
PlugInPropertyAttribute(String, String)
Initializes a new instance of the PlugInPropertyAttribute class.
Declaration
public PlugInPropertyAttribute(string name, string description)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the page extension. |
System.String | description | The description for the page extension. |
Remarks
Initializes the DisplayName and Description properties as part of the initialization process. Unless you manually set the LanguagePath property you will not benefit from the automatic translation support in EPiServer.
PlugInPropertyAttribute(String, String, String)
Initializes a new instance of the PlugInPropertyAttribute class.
Declaration
public PlugInPropertyAttribute(string name, string description, string languagePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the page extension. |
System.String | description | The description for the page extension. |
System.String | languagePath | The language path to use when trying to look up translations for the DisplayName and Description properties. |
Properties
AdminControl
Gets or sets the web control used for editing the property.
Declaration
public Type AdminControl { get; set; }
Property Value
Type | Description |
---|---|
System.Type | The admin control. |
Remarks
The type must be a class that inherits from System.Web.UI.WebControls.WebControl.
AdminControlValue
Gets or sets the name of the property on AdminControl that contains the property value.
Declaration
public string AdminControlValue { get; set; }
Property Value
Type | Description |
---|---|
System.String | The property name. |
Remarks
When an edit view is created for the plugin property, the value for the AdminControl property named AdminControlValue is read and written to the property that this attribute instance is applied to.
Description
Description of the plugin property.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String | The description. |
Remarks
If a LanguagePath has been defined, the return value for Description will be the translated text from LanguagePath + "/description"
DisplayName
The display name for the plugin property.
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string with the display name. |
Remarks
If a LanguagePath has been defined, the return value for DisplayName will be the translated text from LanguagePath + "/displayname"
LanguagePath
Path to node in language files where translation can be found.
Declaration
public string LanguagePath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Set this property to the path of the XML element that contains the displayname and description elements in one of your language files (an xml file in the /lang directory.)