Class PlugInPropertyAttribute
Defines that a class contains settings editable from admin mode in plug-in manager.
Inheritance
Namespace: EPiServer.PlugIn
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public sealed class PlugInPropertyAttribute : Attribute
Examples
Adding a setting for changing the root page for a special function.
[PlugInProperty(Description = "Sets the root container.", AdminControl = typeof(InputPageReference), AdminControlValue = "PageLink")]
public PageReference EPiID
{
get { return _epiID; }
set { _epiID = value; }
}
Adding a setting for a boolean value with a checkbox as GUI.
[PlugInProperty(Description = "Should we be enabled.", AdminControl = typeof(CheckBox), AdminControlValue = "Checked")]
public bool FunctionEnabled
{
get { return _enabled; }
set { _enabled = value; }
}
Constructors
PlugInPropertyAttribute()
Initializes a new instance of the Plug
Declaration
public PlugInPropertyAttribute()
PlugInPropertyAttribute(String, String)
Initializes a new instance of the Plug
Declaration
public PlugInPropertyAttribute(string name, string description)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the page extension. |
System. |
description | The description for the page extension. |
Remarks
Initializes the Display
PlugInPropertyAttribute(String, String, String)
Initializes a new instance of the Plug
Declaration
public PlugInPropertyAttribute(string name, string description, string languagePath)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the page extension. |
System. |
description | The description for the page extension. |
System. |
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. |
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 Admin
Declaration
public string AdminControlValue { get; set; }
Property Value
Type | Description |
---|---|
System. |
The property name. |
Remarks
When an edit view is created for the plugin property, the value for the Admin
Description
Description of the plugin property.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System. |
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. |
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. |
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.)