0

I am trying to implement a Magazine in Drupal 9. I am confused about whether to use taxonomy term or content type since the data I want to handle is used for both categorizations and storing of content.

I have the following content structure.

A Magazine will have a number of articles, which are categorized under Topics.

  • Magazine 1
    • Topic 1
      • Article 1
      • Article 2
    • Topic 2
      • Article 3
  • Magazine 2
    • Topic 2
      • Article 4
      • Article 5
    • Topic 1
      • Article 6

At present, I am trying the following:

  • Magazine - content type
  • Article - content type
  • Topic - Taxonomy term

Should I use taxonomy term or content type for Magazine? The Magazine content type is used for storing content (for example, cover image, description, and date) and also can be thought of as categorizing the articles and topics.

Please note: A topic can be used in multiple magazines. I have already gone through the following:

I hope someone can guide me through the correct path.

2
  • Because you mentioned an article could belong to several magazines, I would use the entityqueue module especially. Watch a good starting point here: youtu.be/a0SbR7H0xQM
    – PhilY
    Commented Dec 19, 2020 at 16:49
  • Article will not be available to different magazines only the topic is available across different magazines.
    – Harish ST
    Commented Dec 25, 2020 at 9:36

2 Answers 2

2

Drupal 8 taxonomies are entities so you can add custom fields, images (magazine covers), icons, as well as using for classification.

It doesn't sound like the Magazine "content type" is that complex, more of a catch-all for a listing of all your various articles and content related to each magazine, so that (Magazine as a taxonomy) would be my inclination in this situation.

The classification features of taxonomy work better out of the box than if you were do something custom with your content type.

I'd have 2 taxonomies for organising topics by:

(1) Magazine (2) Topic

If you are doing - or envisage possibly doing - something more complex with your Magazine type at a later stage then content type rather taxonomy may be the way to go.

As always with Drupal, there's more than one way to do it and you have to weigh up the pros and cons taking into account: ease-of-use, navigation, theming, scaleability, overhead, etc.

1
  • Thank you for your views. I got the point you mentioned.
    – Harish ST
    Commented Jun 17, 2020 at 5:43
1

categorize the articles based on the categories

  1. Create a Magazine view page instead of the Magazine content type.
  2. Create these filter criteria:

    • Content-type: Article
    • Topic: is one of ( all)
  3. expose the Topic(field_catogry) filter If you want to enable a user to select a specific category, or don't expose it and select the category that you want to display automatically.

enter image description here

show a table of contents under a Magazine

  1. Create another view, name it 'Content Table (type: block)
  2. use the filters to select the content that you want to display in this view, and change other parameters if you need to.
  3. return to Magazine view in front of the Footer section click on Add button

  4. search for View area --> check it --> click Add an configure footer

  5. from view insert select View: content_table ... view

enter image description here

4
  • Thanks for your valuable input. I am not sure I explained it well, but a Magazine consists of number of articles, which are categorized under Topics. Just like any Magazine. There will be many Magazines to be Published. And Frontend view of the Magazine will be like we will show the Cover Image and the Table of Contents of that particular Magazine in a page, and on clicking on any article will open the article in a seperate page. Now the issue is that, a topic (taxonomy term) can be used in different magazines.
    – Harish ST
    Commented Jun 12, 2020 at 19:35
  • What I want is I should be able to display the Articles in a Categorized manner (Topic wise) when creating/editing a Node (Magazine - First Screenshot in the question). Since there is no direct contact for the magazine to Topic (Article has a taxonomy reference to Topic but not to Magazine), I am not sure on how to display them.
    – Harish ST
    Commented Jun 12, 2020 at 19:40
  • The first view you mentioned, shows articles based on the Topic. But there will be many Magazines having the same topic inside it but have different article. It's like Magazine: Covid19 and a Topic in that will be World and contain an article. The same topic World will be available in another Magazine also.
    – Harish ST
    Commented Jun 12, 2020 at 19:47
  • Hi, I have edited the question to address a single question. Can you share your thought on it?
    – Harish ST
    Commented Jun 15, 2020 at 10:48

Your Answer

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

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