Reputation: 3613
Does Magnolia CMS allow you to create your own "content type" or "model"? For that model the user should get a HTML form. It should also be allowed to create new objects with an API (REST).
For example create a new "content type" named Book. Define the Model of a book => title:string, cover:file, author:string - now you can create a new book with the html form in the cms and you can get those books with an GET request: myserver.com/books => response a json with all books and so on.
Does Magnolia CMS provide such a functionality?
Upvotes: 1
Views: 850
Reputation: 4369
Yes it does.
You can create custom content type and store it in custom workspace as well as generate content app for editors to work with the content.
You can also define templates to render such content on the website and default REST end points allow you to consume it directly.
If you want to use different than default json format you can specify your own custom REST end point or create template that will output required json for example by using magnolia-jsonfn
module.
You do not even need to create a model class for processing the content type, but you can if you want to.
There's plenty of examples on how to create such custom types and apps in documentation.
Upvotes: 3