November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Have you tried without using a custom PropertyListBase<>? Shouldn't need that anymore. Probably some issue with json serialization...
[PropertyDefinitionTypePlugIn]
public class MenuItemListProperty : PropertyList<MenuItem> { }
What does MenuItem contain? Any suspect url properties?
Hej Daniel,
hmm without it i get
public class MenuItem
{
public string Title { get; set; }
public bool CssBold { get; set; }
public bool CssCampaign { get; set; }
}
This is locally for now. I have tested with Url and removed it for test. Ive seen solution with UrlConverter if I were to use Url.
Hi, Daniel is right about the base class.
I just copied your code into an Alloy site, and made some small adjustments.
My example menu class:
public class MenuItem
{
public string Title { get; set; }
public string Url { get; set; }
}
The property definition:
[PropertyDefinitionTypePlugIn(
DisplayName = "Menu list property",
GUID = "28B811BE-9551-4F73-A86E-584044432B66")]
[Serializable]
public class MenuItemListProperty : PropertyList<MenuItem>
{
}
I like adding a name and guid to my property definitions. Why: https://www.gulla.net/episerver-and-renaming-a-custom-property/
I also added the Serializable-attribute.
Then add a property to ArticlePage:
[Display(Order = 340, GroupName = "Menu")]
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<MenuItem>))]
public virtual IList<MenuItem> TopBannerMenu { get; set; }
It worked for me in an Alloy site running 11.18.0 (I know that version were delisted).
If it still does not work, I would enter admin mide, click «Config», «Edit custom property types», then delete your property definition and restart the site.
thx Thomas, I changed to
MenuItemListProperty : PropertyList<MenuItem>
and removed the property, restarted, and i works!
Thanks ;)
CMS 11.14.2
Ive implemented an IList<MenuItem> but it is not triggering the "Save/publish" button on change/add, what am I missing?
Ive implemented the necessary items i think:
No javascript error in console, other property lists in solution are working.