Class GuiPlugInAttribute
Settings for plugins in graphical modes
Inheritance
Implements
Inherited Members
Namespace: EPiServer.PlugIn
Assembly: EPiServer.dll
Version: 8.11.0Syntax
[AttributeUsage(AttributeTargets.Class)]
public class GuiPlugInAttribute : PlugInAttribute, _Attribute
Remarks
To translate DisplayName and Description of a plug-in you have to add your own xml file in the “lang/” directory and set the property LanguagePath. If you for example set LanguagePath to /myplugin/sample the xml paths you add should be /myplugin/sample/displayname and /myplugin/sample/description.
There may be some plug-ins that requires special security roles or other circumstances that the plug-in framework doesn’t have knowledge of, in these cases you may implement ICustomPlugInLoader on you plug-in. This will allow you to control loading of the plug-in yourself.
Some plug-ins need to store some kind of internal settings or state, there are different approaches to this. If you only need to store simple system settings, for example the mail server name in your brand new mail plug-in you probably want to use web.config. If you have large amout of data the obvious choice is to store it in a database. When your need fits in between these two, you need to store small sets of relational data and don’t want to use your own database for this simple purpose you have PlugInSettings. PlugInSettings is used to store plug-in settings and information in a DataSet, these will be persisted as xml together will the plug-in definition in the EpiServer database.
See PlugInAttribute class for more information on how the plug-ins are located and matched.
Examples
Sample plug-in that will show up in the administration menu.
Constructors
GuiPlugInAttribute()
Initializes a new instance of the GuiPlugInAttribute class.
Declaration
public GuiPlugInAttribute()
Remarks
You must use named parameters to initialize the properties.
Properties
Area
The area this plugin supports.
Declaration
public PlugInArea Area { get; set; }
Property Value
Type | Description |
---|---|
PlugInArea |
Category
The category of the plugin (currently only supported by Report and Visitor Group Criterion).
Declaration
public string Category { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RequiredAccess
The required page access to view plugin (currently only supported by EditPanel).
Declaration
public AccessLevel RequiredAccess { get; set; }
Property Value
Type | Description |
---|---|
AccessLevel |
Url
The url to the resource defined by Area.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UrlFromModuleFolder
Gets or sets the URL relative the folder of EPiServer Shell module that plug-in belongs to. ModuleType property must be defined to resolve the path to module folder.
Declaration
public string UrlFromModuleFolder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The URL relative the corresponding Shell module folder. |
UrlFromUi
Gets and sets the url relative the UI directory to the resource
Declaration
public string UrlFromUi { get; set; }
Property Value
Type | Description |
---|---|
System.String | The URL relative the UI directory |
UrlFromUtil
Sets the URL relative the util directory to the resource
Declaration
public string UrlFromUtil { get; set; }
Property Value
Type | Description |
---|---|
System.String | The URL relative the util directory |
Methods
Match(Object)
Returns a value indicating whether this instance equals a specified object.
Declaration
public override bool Match(object o)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o | The object to match. |
Returns
Type | Description |
---|---|
System.Boolean | True if the object matches this instance. |
Overrides
Remarks
Used internally to selectively load plugins.
ResolvePathInternal(String, GuiPlugInAttribute.ResolvePathDelegate)
Resolves the path to plug-in resources.
Declaration
protected string ResolvePathInternal(string path, GuiPlugInAttribute.ResolvePathDelegate resolvePathDelegate)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path. |
GuiPlugInAttribute.ResolvePathDelegate | resolvePathDelegate | The resolve path delegate. |
Returns
Type | Description |
---|---|
System.String | Resolved path. |
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |