Multi references in a blog custom field

Hi, I’m doing a blog, and in the model custom fields I need to put reference to the authors. Is there a way in which I can refer to two or more authors? Thanks

Hi @emiliano a reference custom field type only accepts a single reference. However, if you want to accept multiple references, you can either put multiple reference-type custom fields on the page, or you could create the Authors input as a list type, and have the sub fields be references.

Let me know if that works for you!

1 Like

Hello @TimG
Is there any way to get the model item having this particular field of the list reference model in React?
For example, i have a blog model and I have assigned a custom field list named taxonomy and each list field has model reference category and I want single blog post having some category

Hi @rinkal could you explain your use case a bit more?

Is the request that you be able to query for content that has one list item that points to a specific reference? If so then yes, as long as you know the referenced items ID you can. You arent able to query for content within the reference currently, but using the ID should work with no problem!

For example, if I have a homepage model that has an input called AuthorList made up of renfences to a model called author, I can query for a specific author with this api call:

https://cdn.builder.io/api/v3/content/homepage?apiKey=271bdcf584e24ca896dede7a91dfb1cb&query.data.authorList.author.id=0573c0fe053a44c8be2aa447ce3bdbbd&fields=name,data.authorList

or in our SDK:

builder.get('homepage', {
   query: {
       data: {
           authorList: {
                 author: {
                       id: '0573c0fe053a44c8be2aa447ce3bdbbd'
                 }
           }
       }
  }
})