Headless CMS
3 posts by 2 authors in: Forums > CMS Builder
Last Post: 2 hours ago (RSS)
Hi,
Can I ask a very simple question?
Is CMS Builder consider as a Headless CMS?
Thank You,
Yusuke
By Dave - Yesterday at 7:46pm
Hi Yusuke,
A headless CMS is basically a CMS that stores and manages content and exposes it via an API (usually JSON over HTTP). It does not handle page rendering or theming; the front end is a separate app that just consumes the API.
CMS Builder sits pretty close to that:
- It handles content modeling, storage, and retrieval.
- It does not force any templating system or theme on you.
- It gives you PHP code snippets that return records/lists as arrays, and you decide what to output.
Out of the box, those snippets are usually used to output HTML, but there is nothing stopping you from doing:
header('Content-Type: application/json');
echo json_encode($records);
exit;
At that point, that PHP page is an API endpoint, and CMS Builder is effectively acting as a headless CMS behind it.
So while CMS Builder is not a headless CMS by default in the sense that it does not ship with a generic JSON API, it is designed as a toolkit to let you build your own CMS. If you use it to expose your content through JSON endpoints, what you have built on top of it is a headless CMS.
So if you are responding to a quote request that requires a headless CMS, you can quite honestly say: yes, we can provide a headless CMS architecture and deliver all content through JSON APIs.
Hope that helps!
interactivetools.com
By Dave - 2 hours ago
Also, I’ll add that if you use a headless setup, you build the front end a bit differently.
Instead of using PHP's getRecords() to load a $records var and loop over it, you'd code your front end to fetch JSON from your API and render it. That could be plain JavaScript using fetch/AJAX to populate the page, or a frontend framework like React, Vue, or Angular, or even a server-side app (PHP, Node, etc.) that calls the JSON API and renders HTML.
interactivetools.com