Group of pages blueprint get user.username

Hello,

how do i get the username if the user id is known?

field

 created:
    label: created by
    type: users
    disabled: true

get username from user id

info: " {{ page.created.username }}"

I don’t know the right syntax

greetings perry

info: "{{ page.created.toUser.username }}"
2 Likes

Thank you @texnixe

I searched the docs but found nothing, where can I find it ?

edit:

1 Like

There are two field methods for the users field:

  • toUser() to create a single user (useful if you only store one user in a field)
  • toUsers() to create a users collection from multiple users stored in a users field