Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get placeholder data via API/KQL #26

Closed
hansipete opened this issue Jul 17, 2023 · 1 comment
Closed

Get placeholder data via API/KQL #26

hansipete opened this issue Jul 17, 2023 · 1 comment

Comments

@hansipete
Copy link

Is there any chance to use Kirby Query Language to get placeholder data?

I tried the following — It was a desperate shot in the dark and with no success :-)

...
photo: {
  query: "page.photos.toFiles.first",
  select: {
    url: true,
    placeholderUri: true,
    focus: true
  }
}

Maybe that's more of a KQL-Question on how to call fieldMethods in a query...

@johannschopplich
Copy link
Owner

johannschopplich commented Jul 19, 2023

I have added support for KQL. Glad you asked!

Usage should work as shown below. The placeholder and placeholderUri file methods are now accessible via KQL:

photo: {
  query: "page.photos.toFiles.first",
  select: {
    url: true,
    hash: "file.placeholderUri",
    focus: true
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants