Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

How to apply multiple UIHint to a property editor

$
0
0

Hi,

I am trying to apply a css class to the default property editor for the ContentReference type

But it only apply my UIHint and not apply default  [UIHint(EPiServer.Commerce.UIHint.CatalogContent)]

How can apply both of them?

My code

namespace NTC.Models.Commerce.V2.EditorDescriptor
{
[EditorDescriptorRegistration(
TargetType = typeof(ContentReference),
UIHint = SiteUIHints.ReloadPage)]
public class EmbiggenEditorDescriptor : EPiServer.Shell.ObjectEditing.EditorDescriptors.EditorDescriptor
{
    public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<System.Attribute> attributes)
    {
       base.ModifyMetadata(metadata, attributes);
       metadata.EditorConfiguration.Add("class", "epi__catalog-node--reload");
    }
}
}

[CultureSpecific]
[AllowedTypes(typeof(NTCCategory))]
[UIHint(SiteUIHints.ReloadPage)] // Only apply this UIHint
[UIHint(EPiServer.Commerce.UIHint.CatalogContent)] // Can't apply this UIHint
public virtual ContentReference CategoryNode { get; set; }

Thanks,

Thao Pham


Viewing all articles
Browse latest Browse all 6894

Trending Articles