2

I am trying to get a handle on Taxonomy Vocabularies and when to have a separate vocabulary vs when to have multiple fields feed into one vocabulary. How this relates to term pages and Views pages and diplaying content in general.

I have 4 fields:

  1. Artist Name
  2. Song Writing Credit
  3. Song Performance Credit
  4. Song Composer Credit

Most of the time the 'Artist Name' is the same as the 'Song Performance Credit' and most of the time there's a different composer and writing credit.

I have 2 options when creating Vocabularies:

  1. have all fields feed to one Vocabulary called "Artist Name"
  2. have a different Vocabulary for each field

The reason for option 1 is being able to display all content the artist is related to in a View. example: Artist Joe Blow performed on song 6 of an album. It's not his album but if a customer loves him they should be able to go to his artist page and see that album displayed. Therefore any time his taxonomy term is used on a performance credit or written by credit or composer credit it will be associated with that same taxonomy term and therefore be connected to that artist.

The reason for option 2 is if I want to display a list of all composers on the site, or all song writers or all performers. If i bundle everything into one vocabulary, then a taxonomy page for "Artists" will show all taxonomies in that vocabulary including the composers, performers and writers. So keeping each field associated with a unique Vocabulary will allow for this separation. However then Joe Blow might be in various vocabularies and not necessarily linked to his artist page.

On an artist display page I would like to show a list of all Albums he/she is associated with including their own album but also albums they are featured on. This leads me to believe I should have only one taxonomy term of their name in the system therefore only one Vocabulary where all artist names live.

Questions

  1. what's the best practice with taxonomy and at what point is it good to have different Vocabularies for each field vs one Vocabulary that multiple fields feed into
  2. How are they suppose to be entered and organized for future relational connections?
2
  • What about a taxonomy term reference field in the tadonomies that moght overlap referencing an additional taxonomy. So that Jow Blow as artist term and Jow Blow as performer term would both reference a term from an additional taxonomy called sth. like "Names".
    – schlicki
    Feb 11, 2017 at 11:22
  • Thanks for the thought. That's one of the way to solve it. My question is what's the best practice with taxonomy and at what point is it good to have different Vocabularies for each field vs one Vocabulary that multiple fields feed into. i've updated my question.
    – Anon Ymous
    Feb 11, 2017 at 19:13

1 Answer 1

0

I'd not use a taxonomy at all for implementing what you're asking for. Instead I'd use the Entity Reference module and add an entity reference field like so (in the order specified):

  • create an extra content type (say) "Artist".
  • create a node for each Artist you ever want to be able to reference in any of those 4 fields.
  • make each of your 4 fields an entity reference field.

That's all you'd need.

If I may say, this would still be a solution that could work if some day you have hundreds (thousands?) of Artists. If however you'd use your option 1, or option 2 (using vocabularies), do you think that would still be "usable" (practical)?

However, you may then also want to enable the Inline Entity Form module which, as mentioned on its project page, "provides a widget for inline management (creation, modification, removal) of referenced entities".

More info

Have a look at the answers to these questions for some related topics:

PS: this could work for either D7 or D8.

1
  • Thanks I hadn't thought of that. Questions though. Maybe you could update your answer. What's the benefit of content type vs taxonomy term? Both allow for multiple fields. Would i have to create an entity before I can reference it with an entity reference field?
    – Anon Ymous
    Feb 11, 2017 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.