BlockCMS - AquilaCMS/aquila-connector GitHub Wiki

/src/api/blockcms/index.js

Functions

Get a specific blockcms

getBlockCMS(code, lang)
  • code - string : blockcms's code
  • lang - string? : current language ("fr" is the default value) - Optional
Example
import { getBlockCMS } from 'aquila-connector/api/blockcms';
const oneBlockCMS = await getBlockCMS("code", "fr");

Get a list of blockcms

getBlocksCMS(codes, lang, postBody)
  • codes - array[string] : Array of blockcms's code
  • lang - string? : current language ("fr" is the default value) - Optional
  • postBody - any : in the case where we want to recover the CMS blocks other than by the codes
Examples
import { getBlocksCMS } from 'aquila-connector/api/blockcms';
const allBlockCMS = await getBlocksCMS(["code1", "code2"], "fr");
import { getBlocksCMS } from 'aquila-connector/api/blockcms';
const postBody = {"filter": { "code": "code" }, "limit": 99, "structure": { "translation": 1 }};
const allBlockCMS = await getBlocksCMS([], "fr", postBody);
⚠️ **GitHub.com Fallback** ⚠️