Search code examples
phpmany-to-manydirectus

How do I show a label on a many to many relationship in Directus?


I have added working, many-to-many relationships to a directus api through the directus admin app, but in the directus app when going to add an item to a collection, the label for the select options are not being propagated. I am able to select items and save everything correctly, so I know the many to many relationship is set up correctly, but I cannot propagate the label correctly. I have tried several different methods, including using the . notation to access fields in the relating collection, but to no avail.

When using dot notation, the relationship never loads and only shows a loading sign, while when putting nothing in label works, but no label.

Below are a couple screenshots:

This is where i put in the label

This is one of the many to many relationships

This is the loading sign that never changes when using dot notation or anything in label.


Solution

  • If you want to see the name in directus 9. It's possible in the option Display Template.

    enter image description here