Hello,
I added the “member” field in my “users” folder to set up user info.
I would like it to appear after selecting a user. Currently it only displays the username.
I would need the name + the “member” field.
I created a “value” but it doesn’t work.
name:
label: NOM Prénom
type: users
query: kirby.users.filterBy('member', '>', '')
text: "test: {{ user.member }} - {{ user.firstname }} {{ user.namefamily }}"
value: "{{ user.firstname }} {{ user.namefamily }} {{ user.member }}"
width: 1/1
default: none
max: 1
I specify that it is a structure to preserve the possibility of manipulating the order.
When I select no problem, but when I validate there is only the name that appears.
It’s not much, but it would be very useful.
The way the users field is shown inside the structure field is determined by the structure field preview for the that field, not by what you set in your users field. The users field, by the way, doesn’t have a value
option. Don’t quite understand the purpose of the structure field for this use case as a users field would also allow you to sort your users.
Okay,
the goal is to add each member whose “member” field has a minimum character (a title such as president, vice president, treasurer…) and to be able to sort them in an order.
Is there actually another solution?
front-end side I will display a trombinoscope with the photos of the members of the office of the association.
As far as I can see, the only field inside your structure is a users field. So instead of selecting multiple users in your users field, you are selecting a single user per item in a structure field, which in my opinion is unnecessary, as the users field allows you to sort the selected users just as well.
I understood.
I removed the structure.
The top would be that I manage to display the photo of the member. Is it possible ?
name2:
label: Membre du bureau
type: users
query: kirby.users.filterBy('member', '>', '')
text: "{{ user.member }} - {{ user.firstname }} {{ user.namefamily }}"
layout: cards
image:
back: white
size: small
In my users/client.yml file here is how the photo is structured
columns:
- width: 1/3
sections:
downloads:
headline:
label: Photo
type: files
layout: cards
info: "{{ file.caption }}"
image:
ratio: 3/4
max: 1 #maximum 1
- width: 2/3
fields:
firstname:
label: Prénom
type: text
width: 1/2
image:
query: user.image
background: white
A big thank-you.
I had tried things like that but couldn’t find the right information.
I also try to put 4 or 5 images per line. It’s possible ? Currently it puts 3 images default, it’s a bit big
It doesn’t seem to be size or width.
It’s ok: size: tiny
name2:
label: Membre du bureau
type: users
query: kirby.users.filterBy('member', '>', '')
text: "{{ user.member }} - {{ user.firstname }} {{ user.namefamily }}"
layout: cards
image:
query: user.image
cover: true
back: white
size: tiny