Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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.
[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; } }
{ "contentLink": { "id": 202, "workId": 0, "guidValue": "5ff3fc26-7a31-4820-b947-2a918e222065", "providerName": null, "url": "/test/", "expanded": null }, "name": "Test", "language": { "link": "/test/", "displayName": "English", "name": "en" }, "existingLanguages": [ { "link": "/test/", "displayName": "English", "name": "en" } ], "masterLanguage": { "link": "/test/", "displayName": "English", "name": "en" }, "contentType": [ "Page", "TestPage" ], "parentLink": { "id": 5, "workId": 0, "guidValue": "1611ac34-e475-41fe-b278-1be758763003", "providerName": null, "url": "/", "expanded": null }, "routeSegment": "test", "url": "/test/", "changed": "2022-02-25T12:02:15Z", "created": "2022-02-25T12:02:06Z", "startPublish": "2022-02-25T12:02:15Z", "stopPublish": null, "saved": "2022-02-25T12:04:54Z", "status": "Published", "category": [], "requiresAuthentication": null, "meta": { "title": "", "description": "", "robots": "" }, "child": { // this is the first block referenced by the page "id": 204, "workId": 0, "guidValue": "ca5cae7a-06af-420d-806d-0c9a49e36b43", "providerName": null, "url": null, "expanded": { "contentLink": { "id": 204, "workId": 0, "guidValue": "ca5cae7a-06af-420d-806d-0c9a49e36b43", "providerName": null, "url": null, "expanded": null }, "name": "Test 1", "language": { "link": null, "displayName": "English", "name": "en" }, "existingLanguages": [ { "link": null, "displayName": "English", "name": "en" } ], "masterLanguage": { "link": null, "displayName": "English", "name": "en" }, "contentType": [ "Block", "TestBlock" ], "parentLink": { "id": 203, "workId": 0, "guidValue": "0fd61ab0-e440-4084-88ab-4eeefcd35c66", "providerName": null, "url": "/contentassets/0fd61ab0e440408488ab4eeefcd35c66/", "expanded": null }, "routeSegment": null, "url": null, "changed": "2022-02-25T12:02:59Z", "created": "2022-02-25T12:02:37Z", "startPublish": "2022-02-25T12:02:59Z", "stopPublish": null, "saved": "2022-02-25T12:05:07Z", "status": "Published", "category": [], "heading": "Test 1", "child": { // here is the child property of the block which should be another block with a heading etc. but 'expanded' is null? "id": 206, "workId": 0, "guidValue": "5f05d107-8973-46c6-9e37-3c71729d283a", "providerName": null, "url": null, "expanded": null } } } }