Best Practices

Content Modelling with References and Links

References and links let you build rich, interconnected content graphs in Localess without duplicating data.

·
Sofia Müller· Product Manager
References and links let you build rich, interconnected content graphs in Localess without duplicating data.

One of the most powerful features of Localess is the ability to link content entries together. This enables you to build content graphs that are flexible, reusable, and easy to maintain.

  • References point to another content entry that is fetched and embedded inline at query time.
  • Links are lightweight pointers that resolve to a URL — useful for navigation and CTAs.

Defining a reference field

{ "type": "reference", "key": "author", "schemas": ["author"] }

Resolving references

Pass resolveReference: true when fetching content:

client.getContentBySlug('article', { resolveReference: true });

The SDK will embed the referenced document inline, so you don't need a second round-trip.