Suncel home pageSuncel logoSuncel v1.1
  1. GetGlobal

API > GetPage

GetGlobal

The GetGlobal function allows you to fetch the content/properties for only one global.

Fetch the Global by its Id. The function will return a type Global.

Import 

import { getGlobal } from "@suncel/nextjs/api";

Function signature

const getGlobal = async <GlobalContentType = Record<string, any>>(
  globalId: string,
  options?: GetGlobalOption
): Promise<RequestResult<Global<GlobalContentType>>>
  • globalId: Id of the Global to fetch

  • options: Optional fetching options (see below)

Options

type GetGlobalOption = {
  language?: string;
};
  • language: To select the content of the language. If your global have multiple languages