I’m trying to set up a relation of a collection type (Articles) with the same collection type (Articles). I would like to have the articles relation name but if I use the same name on both ends of the relation, it will say that “This value is already used.“. Does anyone know how to achieve this or if it’s possible?
Please note that I need to have the same field on boths sides of the relation, not different ones (I know that’s possible). Also the relation needs to be visible on sides, not “has many” won’t work either.
hey man can u explain what do u want to do with ur collection type ? i dont understand why should u want to relation articles with articles . example i want a collection type resturant with it has and belongs to many food .
That’s exactly what I’m trying to achieve, related_articles! I need a bidirectional relation, so all related articles are under the same field related_articles on both articles.
I don’t know if this is possible with bidirectional relation. Never tried it.
But I can recommend you another flow that I used, create a collectionType called Tags and create multiple tags there, like: health, travel, money, relationship, etc.
Add all related tags to your articles and in frontend get only the articles with similar tags. That way you will get more “intuitive” related articles.
In this case, the client will want specifically to relate certain articles with others. I don’t think tags will work, unfortunately.
I just can’t believe this is not achievable. And I will have this same issue with other collection types as I need to have the same scenario with others.
Do you know if this will be developed at some point or where I should raise this?
well if it was me i would create a collection type named article categories
relate it with my articles or
a repeatable component with tags . then would create a dynamic page in my frontend for the selected tag that if someone klick a tag it would filter the articles with that tag
I already have a Article categories collection type which is different from a Related articles relation. I simply need to have a collection type related with itself, in more than one scenario. Does that mean it’s not possible?
Well I just had the same issue as you (collection type Project should have a relation with the collection Project ), my answer surely come to late but maybe it will help some others.
To resolve that I had to create a simple component with a single field, and this field embed the needed relation.
That is helpful to me but i want that user can only select 3 related articles not more than that you know how could i set the limit for this relation ??
I did implement as per your solution. But the related ID is showing only the same ID as of the row and not the related IDs. Can anyone help me on this?