November Happy Hour will be moved to Thursday December 5th.

Class VisitorGroupCriterionAttribute

Attribute used to declaratively define visitor group criterion definitions.

Inheritance
System.Object
VisitorGroupCriterionAttribute
Namespace: EPiServer.Personalization.VisitorGroups
Assembly: EPiServer.Framework.AspNetCore.dll
Version: 12.0.3
Syntax
public sealed class VisitorGroupCriterionAttribute : ServicePlugInAttributeBase, IServiceConfiguration, IVisitorGroupCriterionDefinition

Constructors

VisitorGroupCriterionAttribute()

Initializes a new instance of the VisitorGroupCriterionAttribute class.

Declaration
public VisitorGroupCriterionAttribute()
Remarks

You must use named parameters to initialize the properties.

Properties

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

Description

Description of the plugin

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.

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.)

Examples

For a LanguagePath with the value "/myshop/plugin/ShopPluginTree/" the XML should look something like this:

<languages>
<language name="English" id="EN">
<myshop>
<plugin>
<ShopPluginTree>
<displayname>My shop</displayname>
<description>Description of shopping tab</description>
</ShopPluginTree>
</plugin>
</myshop>
</language>
</languages>

ScriptShellModuleName

The name of the shell module that serves the script in the script url If no name is provided the assembly where this VisitorGroupCriterion resides will be used to lookup a shellmodule

Declaration
public string ScriptShellModuleName { get; set; }
Property Value
Type Description
System.String

ScriptUrl

Gets and sets the url relative the shell module to the resource If an absolute url (starting with '/') is set that url is left untouched

Declaration
public string ScriptUrl { get; set; }
Property Value
Type Description
System.String

The URL relative the UI directory

TypeGuid

Gets or sets the unique type identifier for the visitor group criterion type

Declaration
public string TypeGuid { get; set; }
Property Value
Type Description
System.String

The unique type identifier for the visitor group criterion type. Default value is null.

Remarks

Use GetTypeGuid() to check if a value has been assigned.

Methods

GetTypeGuid()

Returns the nullable Guid for the corresponding property TypeGuid.

Declaration
public Nullable<Guid> GetTypeGuid()
Returns
Type Description
System.Nullable<System.Guid>
Remarks

If the usage of the attribute has not set the TypeGuid property this will not have any value.

Implements

Extension Methods