Can an arbitrary number of ContentItemsthe same class be added to a page in N2? And can they be nested?
those. Is there a way to define a collection ContentItemsas a property in N2? IDs also like to embed them, if possible, so that we can run more meaningful queries against the data. (For example, instead of a huge EditableTextRegionsone that will be difficult to request.)
Currently, I have the following model as "ideal", can it be N2ified? (Ive left N2 style attributes and getters / setters for clarity)
public class Link : ContentItem
{
public string Text { get; set; }
public string Title { get; set; }
public string Url { get; set; }
}
public class Panel : ContentItem
{
public string Title { get; set; }
public string Text { get; set; }
public List<Link> Links { get; set; }
public string ImageUrl { get; set; }
}
public class Page : ContentItem
{
public string Title { get; set; }
public string BodyText { get; set; }
public List<Panel> Panels { get; set; }
}
source
share