Try our conversational search powered by Generative AI!

What is the maximum level of Expand parameter for Content Areas?


We have a page strucutre with 3-4 levels of nested blocks inside of Content Areas. 
Simplified example :

public class Level2Block : BaseBlock
    public virtual string Name { get; set; }

    public virtual int Age { get; set; }

public class Level1Block : BaseBlock
    public virtual ContentArea Level2 { get; set; }

class MyPage : BasePage 
    public virtual ContentArea Level1 { get; set; }

The problem is that Content Delivery Api with expand=* will expand only Level1  property,

but Level2 property will not be expanded and will contain a list of content links to contained Level2 blocks.

Is there any solution or at least a reason of what is going on?

Oct 13, 2022 10:06

Personally I always have a design practice in place to only ever allow 2 levels at max. A block in page and block in that block when really needed but reducing the number of blocks is key.

However you can configure the number of expanded levels with the package documented here 

services.ConfigureRecursiveContentAreaContentApiOptions(o =>
    o.MaxExpandContentAreaLevels = 4;
Edited, Oct 13, 2022 10:55
klappo - Oct 13, 2022 11:56
thanks so much for the answer
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.