Under Community Review

Expand linked ("nested") content in the Public Content API

This idea is asking for the ability to retrieve nested/linked content in the GraphQL-based Public Content API (PCA) for pages or Components that contain Components that link to other Components.

Use case

The use case is to give developers using the Content Delivery APIs a way to create just the necessary GraphQL-based queries against the PCA that will handle all the variations of content types (Schemas). That way, CD API users wouldn't need as many queries to get a page, linked Components, and further nested Components.

The (automatic) Semantic Content Models that are generated as of Tridion Sites 9.6 definitely help with giving developers typed objects at a Component level (see: https://tridion.stackexchange.com/q/22092/46). However, there doesn't seem to be a simple way to automatically get linked Components as objects, rather than as IDs that need to be used in additional queries. 

For comparison, the Digital Experience Accelerator's data model for pages provides the full JSON of a page, its direct Components, as well as linked Components.

Possible parameters

As part of this enhancement request, please consider parameters and even Content Manager-side control for things like:

  • An option or configuration of when to treat a Component link as content versus as a link. Though this could be a CD API parameter, I would love to see a new Schema field type that explicitly said a field was (just) a link, or some content to expand, or both.
  • Options for maximum depth of the expansion, with some default setting (maybe expand everything)
  • A way to influence the "linkability" (as a destination) for select content (see below) 

Related Content Manager features

When considering links versus full content models in Content Delivery, especially with regions and the data publishing pipeline, it'll be important to address Component Presentation and Component Linking features.

Specifically, Component Templates help manage:

  • Linking destinations. Which Component (presentations) are included, excluded, or prioritized in Component Links, based on proximity rules
  • How content behaves. Editor control over how much of a Component's content (fields) appear in different pages
  • Publishing, to a lesser extent. The ability to update content across a site (by publishing the Template itself)

This could mean CM-side control for things like:

  • Treating components as a link
  • (With a certain field as the link text)
  • Treating linked components as full content (making the linking Component a "container")
  • A way to designate items on a page as either a "main" or "linkable" Component
  • Maybe the ability to publish a Schema to queue a publishing update to the appearances of that Component 

In short, this request is mainly for the ability to get linked content automatically expanded, and typed, in a single Public Content (GraphQL) API request.

However, if/when picking up this enhancement request, I'm asking for more of the "expansion" control and parameters to be managed and exposed from the Content Manager. So rather than needing CD API parameters that pick-and-choose which Schemas to expand, which to link to, or which to ignore, it'd be great to have more of those controls in the Content Manager. This would be much like the newer Schema fields that control what gets published and indexed. Maybe in the future there's an option to turn a Component into a "container" or region. Or maybe there's a new kind of Component Link? Thinking