Skip to main content

Integration Function

The Content function provides the vendor-agnostic interface to the CMS provider. It is intended to be used in server components or route handlers.

This Function is Server Only

Do not try to instantiate the Content() function in client ("use client") components. CMS content is always server fetched and rendered

Usage

const { getContent } = Content({
locale: 'en-US',
});

const homePageContent = await getContent('page', {
handle: '/',
});

Reference

getContent

Get content by type and the current rendering context (Current href, locale, etc)

getContentById

Fetch content by identifier regardless of type

getLayoutContent

Get content that is shared by the root layout such as navigation and footer

getAll

Get all content items of a particular type