grav-plugin-api
grav-plugin-api copied to clipboard
feat: ability to create modular pages
Need to figure out the best way to get/create/modify a modular page. Currently, the /pages
endpoint only really supports non-modular...
So, you can currently edit modular page content by querying for the child routes with a _
prefix, e.g. /modular-page/_module-one
or /modular-page/_module-two
.
However, would it be nicer to support editing modular content for parent/multiple child modules in one request? Maybe something like:
POST /api/pages/modular-page
{
"route": "/modular-page",
"header": {
"title": "A modular page"
},
"modules": {
"module-one": {
"header": {},
"content": "some content"
}
}
}