Given I have a page type 'TestPage' that has one property which is a ContentReference to a block type 'TestBlock' which in intself has a ContentReference to another TestBlock
The content delivery API does not return the referenced ContentReference from the block. The page ContentReference is returned and expanded but the block is not.
Is there anything I can do to get the full nested ContentReferences?
Here are the Page/Block types for example:
[ContentType(GUID = "F40176A2-E3A2-43F8-A18B-2A133D5D8BBC", DisplayName = "Test Page")]
public class TestPage : PageData
{
[AllowedTypes(typeof(TestBlock))]
[Display(Name = "Child", Order = 10)]
public virtual ContentReference Child { get; set; }
}
[ContentType(GUID = "9DDFEF96-AB5B-42CD-80D0-31D9E65ADAE6", DisplayName = "Test Block")]
public class TestBlock : BlockData
{
[Display(Order = 5)]
public virtual string Heading { get; set; }
[Display(Name = "Child", Order = 10)]
[AllowedTypes(typeof(TestBlock))]
public virtual ContentReference Child { get; set; }
}
This is an example response when calling the content delivery API with an expand property set to '*'. See that the first block from the page is expanded but the second is not (i've commented the JSON).
Not ideally to have multiple nested blocks for content delivery for performance reasons- by default it will only expands to 1 level . you can cetainly customise but I would rather perfer not to have that level of nesting and consider remodeling.
We have remodelled but I would be interested to know how to configure it anyway in case we need it in future? I can't find anything in the documentation to let me know how to configure it?