Comments (5)
KQL uses an allow-list for objects and methods that can be queried and executed. Blocks are not included. We will very likely not support the editor blocks, but the blocks of our upcoming blocks field. The editor is going to be replace by that eventually.
from kql.
Ah, I see. I was of the impression the editor plugin might be moved to the core as is. Thanks for the hint.
But for clarification, when I understand you correctly, even when I go and install 3.5's release candidate and use the those included block fields, I might still not be able to get those via kql in HTML; this is not implemented yet in kql, is this correct?
So, just for your understanding: Now I'm probably going to build 2 or 3 websites per month on Kirby, all decoupled (headless), which currently is only reliably possible thanks to the kql plugin (the only solution dealing with KirbyText built-in) without additional effort of writing a client-side KirbyText parser. For me, it's still a bit to figure out which headless features or plugins in Kirby are the most robust in the long term.
from kql.
This sounds similar to what I described in #15. The underlying question seems to be whether KQL should return serialized HTML or raw JSON. I can see valid reasons to want either (even both). Perhaps having the option to return either/both is the preferable approach here?
from kql.
That kind of seems out of question to me, as there is parsing logic for blocks in the PHP library. And as kql basically seems to make use of that existing logic in other cases (either directly or by "faking it", I don't know, I didn't look at the code) for every query, it's only logical that this behaviour of the blocks will be available in kql. It would also be inconsistent to have those functions for parsing KirbyText, Arrays, YAML, JSON, Structure fields and so on, but then not for blocks.
For me, the remaining question is rather: When is it going to be available?
(btw. speaking of the editor plugin, you're able to return the JSON by now. But as said, using the blocks function in the kql query seems to return the ids only instead of parsing the whole JSON object)
from kql.
Closing in favour of #20 which addresses the question for the new 3.5.0 blocks and layouts, where I referenced this possibility for the earlier Editor plugin.
from kql.
Related Issues (20)
- [Headless] Question - Is this csrf-token protected? HOT 1
- Pagination not working with "select" HOT 5
- Access file inside Blocks field HOT 4
- Return null or undefined for missing values HOT 2
- [Docs] BasicAuth login only possible via email (instead of username) HOT 3
- [Docs] Provide basic info about how to create a read-only api user HOT 3
- Allow shorthand method *.kt HOT 1
- mention playground in readme HOT 2
- [1.1.0-rc.1] data in response breaking change HOT 1
- [3.8.0-rc.2] Trying to include `uuid` in response returns 403 HOT 7
- How to select URL of optional file easily? HOT 4
- CI
- Support for different selects based on object type (Block type/Page template/User role) HOT 12
- TypeScript types HOT 5
- How to query custom site methods? HOT 2
- Kirby 4 compatibility HOT 1
- Querying content of a certain language code HOT 1
- CORS issue with Kirby QL HOT 10
- Custom Page Model
- KQL playground as installable plugin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kql.