Release Note- 2nd March
Dynamic Content- Content Delivery 2, depth enhancement
In this release
In this release we've made some enhancements to our next generation Content Delivery API, Content Delivery 2. You can now specify a numeric depth when retrieving nested content to provide flexibility and improve performance.
Specifying the depth when retrieving content
In the Content Delivery 2 API, the
depth parameter allows you to control how to retrieve nested content- content that links to other content items. This might be a carousel that links to carousel slides, or a more complex content item that includes several levels of content links.
Previously you could only specify
depth=all to return the root item only, or the root item and all of its dependents, but now you can set
depth to an integer between 0 and 22. Specifying 0 is the same as
root while 22 is the current maximum depth of a content graph.
The carousel example
The example shown below is a carousel. The carousel links to up to 6 carousel slides, each of which has a content link to an image content item. The depth of the dependency tree for the carousel is 2.
To retrieve the carousel, the carousel slides and just the content item ids of the image items, we can specify a depth of 1:
If we specify
depth=all, then the entire dependency tree is returned, including the carousel, carousel slides and the complete image content items.
The carousel is a simplified example and this feature will be even more useful when retrieving content with larger dependency trees.
For more information see the Content Delivery 2 API overview overview page.