How to fetch a specific item from collections

Hello,
I have 2 collections: Blog posts, and authors.
In blog post I have a field with select items: author1 and author2.

In authors, I have information about author1 and author2 (author1 and author2 are the slugs).

In the blog post page, I have a div taking the source from the authors collection. when I add the slug manually it seems it works:

But when I take the slug from the blog post collection, it doesn’t seem to work (slug = $page->get(‘data’)->get(‘authors’)->slug)

And I see this in the page:

Am I doing something wrong?

Hmm I realised it happens with the second “author” only that’s on the list and wondering if the name is not taken with a CR (carriage return) character?

If I change the field from “Select” to “text” it works fine.
Maybe the fact we have to enter the options in different lines is causing this?

@bktag

This should work fine, give me some time to check it, i’ll get back to you.

1 Like