formatz / contao-headless-cms-bundle
Contao Headless CMS Bundle
0.2.10
2024-03-15 13:54 UTC
Requires
- php: >=7.4
- contao/core-bundle: ^4.9
- symfony/serializer: ^5.4
Requires (Dev)
- contao/manager-plugin: ^2.0
Conflicts
- contao/manager-plugin: <2.0 || >=3.0
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
/api/content?id=5
Gets the content of a content element by id
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