November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
We had a similar problem with IList and blocks. A workaround we found that might work here was adding the properties to the content property collection directly. We ended up not using the workaround so I apologize if I get some details wrong. IList has several bugs currently which makes them hard to work with.
public override void SetDefaultValues(ContentType contentType)
{
base.SetDefaultValues(contentType);
if (Property["BackgroundTheme"] is null)
{
Property.Add(
new PropertyString
{
Name = "BackgroundTheme",
Value = "blue"
});
}
else
{
Property["BackgroundTheme"].Value = "blue";
}
}
Hi there,
Does anyone know if it's possible to set default values for a type being used within an IList property?
We've currently got something like the below: user selects a page reference, and a select option. We want to give that select a default value, but can't workout how to do it (if you can). Thought the usual SetDefaultValues would do the trick, but unfortuntely not.
I'm aware we can probably just use a ContentArea to get around this, but would be nicer from an editors POV to utilize the IList property.
So if anyone has any ideas/solutions, let me know :)
Thank you,
Neal
I'm assuming the default value is properly set if you create an IssueCard block yourself, i.e. not through the IList