Try our conversational search powered by Generative AI!

EditorDescriptor table showing content reference id instead of name

Vote:
 

Hi Team,

I am using EditorDescriptor attibute as below in one of Page Type.

[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<Facilities>))]
public virtual IList<Facilities> Facilities { get; set; }

public class Facilities
{
[AllowedTypes(typeof(FacilityPage))]
public virtual ContentReference Facility { get; set; }

public virtual bool IsDefault { get; set; }
}

But in CMS edit, users can see content reference id insted of name. Please refer below screenshot reference.

I have tried below link but that approach has some issues. It was not working some times and also facing issues with table grid add/remove if i follow below link changes.

https://gregwiechec.com/2015/12/propertylist-with-images/

Is there any out-of-box helpers method to show page type name property? Or Can anyone please suggest to acheive this.

Thanks,

Suresh B

#241052
Dec 10, 2020 12:00
Vote:
 

I guess this addon from Jake Jones will do what you ask: https://jakejon.es/blog/enhanced-propertylist-for-episerver which is based on Grzegorz Wiecheć solution

#244755
Dec 10, 2020 22:16
Ted
Vote:
 

The default CollectionEditor widget basically does a ToString() on each item property without any specific formatters. That's why a complex property is displayed as [Object] by default.

ToString() on a ContentReference results in the ID rather then the name of the associated content.

#245691
Dec 17, 2020 18:17
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.