Try our conversational search powered by Generative AI!

IList property doesn't work in several layers

Created

Sep 29, 2023

Updated

Oct 26, 2023

State

Closed, Acceptance tests pass


Description

Add the following classes to the solution.

  • FooterCategory
    [ContentType]
    public class FooterCategory : BlockData
    {
        [Display(
        GroupName = SystemTabNames.Content,
        Name = "Titel",
        Description = "Titel för kategori",
        Order = 100)]
        public virtual string? Title { get; set; }
        [Display(
        GroupName = SystemTabNames.Content,
        Name = "Sektioner",
        Description = "Dela upp kategorin i flera sektioner",
        Order = 120)]
        public virtual IList<FooterSection>? Sections { get; set; }
    }


  • FooterSection
    [ContentType]
    public class FooterSection : BlockData
    {
        [Display(
        GroupName = SystemTabNames.Content,
        Name = "Titel",
        Description = "Titel för sektion (valfri)",
        Order = 100)]
        public virtual string? Title { get; set; }
        [Display(
        GroupName = SystemTabNames.Content,
        Name = "Rader",
        Description = "Rader",
        Order = 120)]
        public virtual IList<FooterRow>? Rows { get; set; }
    }


  • FooterRow
    [ContentType]
    public class FooterRow : BlockData
    {
        [Display(
        GroupName = SystemTabNames.Content,
        Name = "Titel",
        Description = "",
        Order = 100)]
        public virtual string? Title { get; set; }
        [Display(
        GroupName = SystemTabNames.Content,
        Name = "Url",
        Description = "",
        Order = 120)]
        public virtual Url? Url { get; set; }
    }


 

Add the following to a page type

[Display(
Name = "Kategorer i sidfot",
GroupName = TabNames.Footer,
Order = 310)]
public virtual IList<FooterCategory>? FooterCategories { get; set; }


Try to use the GraphQL API to get the properties "Title" and "Rows" inside "Section"

{
  SiteConfigurationPage(locale: sv) {
    items {
      Name
      FooterCategories {
        Title
        Sections {
          Title
        }
      }
    }
  }
}