Running Statamic 1.11.1.
template:
{{ member:listing
conditions = "investments:/portfolio/{last_segment}"
sort_by = "last_name"
role = "investor"
}}
{{ username }}
{{ /member:listing }}
Sample member file:
---
email: [email protected]
first_name: Bob
last_name: Loblaw
password: ""
roles:
- investor
_uid: xxx
investments:
- /portfolio/rutabaga
- /portfolio/potato
- /portfolio/mushroom
- /portfolio/sweet-potato
password_hash: xxx
---
This outputs the indices instead of the usernames. Using Jason's All the Vars plugin, I see that username
's value is null
.
I saw that removing conditions
allows me to get at all the info. As does this not-so-elegant solution:
{{ member:listing
conditions = "investments:/portfolio/{last_segment}"
sort_by = "last_name"
role = "investor"
}}
{{ member:profile uid="{_uid}" }}{{ username }}{{ /member:profile }}
{{ /member:listing }}