formatz/contao-headless-cms-bundle

Contao Headless CMS Bundle

0.2.10 2024-03-15 13:54 UTC

This package is auto-updated.

Last update: 2024-12-10 14:47:34 UTC


README

Requirements

You'll need an up-and-running Contao 4.9.x installation.

Installation

Install composer if you haven't already, enter this command in the main directory of your Contao installation:

composer require formatz/contao-content-api

Contao Content API is now installed and ready to use.

Usage

Once installed, the following routes are available:

/api/page?url=/about/team.html OR /api/page?id=5

Gets the page, including all articles and contents at the url or id.

Example | Example with newslist | Example with newsreader

/api/module?id=5

Gets the content of a module by id

Example (newsreader)

/api/content?id=5

Gets the content of a content element by id

Example | Example with image

All routes also take the additional lang parameter (e.g. ?lang=de). If you need to override the language.

Contribution

Bug reports and pull requests are very welcome :)

© Format-Z 2023