I am currently modifying the default Users view in the panel. That’s going fine, but now I’m needing to get into some of the user blueprint content.
If I modify the query, using parameters that work elsewhere with Kirby API, either in PHP or JSON, I would use select
to add blueprint content
to the response.
let query = {
paginate: {
page: this.page,
limit: this.limit,
},
sortBy: "username asc",
select: "content" // or select: ["content"]
}
this.$api.users
.list(query)
.then(
// do stuff
)
This doesn’t work in the front-end Vue components.
What does expose user.content
is this.$api.users.get(user.id).then()
on each item in the response.data
from this.$api.users.list()
, but doing this on each item from the first response isn’t ideal for performance reasons. I already have over 1000 users on my application, and this number is growing much higher.
So, is there a way to query blueprint content values for users in this.$api.users.list()
or equivalent? It doesn’t work with the same params as the API for /api/users
I am specifically trying to [1] add blueprint content onto the k-collection list, and [2] assemble a uniq list of values from user blueprints e.g. company
so that I can use them for filters, like default ‘role’ filter, in my custom Users panel view.