How to find a certain / specified set of collection entries?

I have set up two collections: people and stories.

Now, each story can have multiple people assigned to it. I've done so by adding people as a collection fieldset:


    type: collection
    collection: people

Say I have "created" two people: John Doe and Jane Doe. I have also created six stories. Two stories only have John Doe assigned, two have Jane Doe assigned and the last two have both people assigned.

What I need is for John Doe and Jane Doe to have a profile page, and on their profile page the stories have to show up that they are assigned to.


The markdown-file for story #1 looks something like:

title: 'This is the title for this story'
  - 39096258-6ebc-4171-852c-4f1ccd852800
id: 3023dc56-97b7-4742-9906-ed16ba82dda5
  - first tag
  - second tag
  - another tag

Out of the six stories there are four that have John Doe assigned.

How can I "collect" those four stories and output them on John Doe's profile page?

I feel I have to be somewhere in this area:


{{ collection:stories condition assigned_people:contains="John Doe" }}
// something
{{ /collection:stories }}

But that doesn't work. I'm guessing because I need to "collect" the ID, not the actual name of the person.

Hope someone can help me with this!

Thanks in advance.

Answered by Kaz van Kooten!
>>>>>>> Answered <<<<<<<
2 Replies