Try our conversational search powered by Generative AI!

Page reference property is displaying page id instead of page name/url using PropertyList implementation

Vote:
 

Hi,

I am trying to display page url instead of Page id in my start page Editor view. I am using IList with an editor descriptor which has two properties CategoryID and PageReference, when i click on + to specify a page link to each category then model window shows drop down list with all categories and option to select a page but after saving my changes in my CategoryLists view i do see page ID(eg: 3459) instead of page name or url. Below is my code sample related to my implementation and appreciate any suggestions or work arounds to fix this issue.

Model:

[CultureSpecific]
[Display(GroupName = Global.GroupNames.SiteSettings, Name = "Category Links", Description = "Name field's description", Order = 210)]
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<CategoryLink>))]
public virtual IList<CategoryLink> CategoryLists { get; set; }

public class CategoryLink
{
[Required]
[Display(Name = "Category")]
[SelectOne(SelectionFactoryType = typeof(CategorySelectionFactory))]
public virtual string CategoryId { get; set; }

[Required]
[CultureSpecific]
[UIHint(UIHint.MediaFile)]
[Display(Name = "Link", Description = "")]
public virtual PageReference Link { get; set; }
}

[PropertyDefinitionTypePlugIn]
public class CategoryLinkPropertyList : PropertyList<CategoryLink>
{
}

#211118
Edited, Dec 17, 2019 21:33
Vote:
 

I think this blog post will help you:

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

The same approach could be used to display the page names.

#211122
Dec 18, 2019 7:44
* 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.