Reputation: 2644
I'm not sure where Display Template option is supposed to show up on M2M relationships.
Here on movies
collection setting up genres
:
and the options
Docs seems confusing about the distinction between Visible Columns and Display Template:
Visible Columns sets the columns the interface shows (we're using
name
)Display Template sets the columns the interface shows (we're using
{{movie.name}}
)
Visible Columns does the above; in this example shows the title
column in edit page for genres
:
Alright, great!
But what about the template? maybe in the collection list?
no, just the count:
I've tried all these templates but nothing shows up anywhere:
{{title}}
{{movie.title}}
{{genre.title}}
{{genres.genre.title}}
What is the correct template here? Where is Display Template supposed to show up?
My collections setup:
movies
title text,
genres M2M (alias)
genres
title text
movies_genres
id pk,
genre numeric,
movie numeric
Thanks
Upvotes: 3
Views: 1856
Reputation: 66
This applies to O2M Interfaces:
Since there can be more than one related item linked, in the items list, the display template is rendered as a number of items until you interact with the item...
If you place your mouse over the Genres Fields, you should see the display template rendered.
A popover should show up and display the list of items as you defined.
Upvotes: 2