Skip to content

Shows image previews and content names in the Episerver PropertyList

License

Notifications You must be signed in to change notification settings

jacobjones/DoubleJay.Epi.EnhancedPropertyList

Repository files navigation

Enhanced PropertyList for Optimizely CMS

After: Enhanced PropertyList

Before: Standard PropertyList

Description

Improves the presentation of ContentReference and Url properties in a Generic PropertyList by showing the content name or a preview if it's an image.

Features

  • ContentReference and Url properties are automatically detected
  • Images are identified by the UIHint attribute with no additional configuration required

Getting started

Installation

Usage

In CMS 12, to register you should call the AddEnhancedPropertyList method in your startup class ConfigureServices method::

public void ConfigureServices(IServiceCollection services)
{
    services.AddEnhancedPropertyList();
}

Usage is then as simple as using the EnhancedCollectionEditorDescriptor (DoubleJay.Epi.EnhancedPropertyList.EditorDescriptors) opposed to the default CollectionEditorDescriptor.

Your property should look like this:

[EditorDescriptor(EditorDescriptorType = typeof(EnhancedCollectionEditorDescriptor<Item>))]
public virtual IList<Item> Items { get; set; }

Further Information

Based on two blog posts (one of which was my own!):

About

Shows image previews and content names in the Episerver PropertyList

Resources

License

Stars

Watchers

Forks

Packages

No packages published