1

As this is my first post here I don't know if I do everything right. Please forgive me.

So, my plan is to build a website with many categories and these than contain posts. To explain the stuff in the easiest way I decided to use Series and Episodes.

  • Serie A:
    • Episode 1
    • Episode 2
    • Episode 3
  • Serie B:
    • Episode 1

For my use I also want to be able to decide what exactly an episode is. For example is it an normal one or just a 20 minute special and should be displayed like this:

  • Serie A:
    • Author:
    • Year:
    • (more stuff here)
    • Episodes: (Headline)
      • E1 (Link to this Episode)
      • E2 (Link to this Episode)
    • Special Episodes: (Headline)
      • E1 (Link again)
      • E2 (Link again)

The problem here is that I don't know if I should create this with Content Types or Taxonomy.

A) So one Content Type for Serie and another one for Episodes. Both with the needed fields. But the problem is here I don't know how to join/connect them properly.

B) Creating a Taxonomy called "Series" and adding all Series into it. Than a Content Type "Episodes" with setting a Tag to connect the Episode to the right Series. The problem I could get here is for example when adding something like genre. A Taxonomy would get a list of Genres like Action, Comedy and so on.

Another point would be accessibility. It should be possible to search for Series include/exclude genres and also searching for fields like year, episode-count of a series.

At last is it possible to create Custom Types where for example a javascript is loaded in the background that parses text from a input text area?

I hope you understand my goal with this example and can tell me the proper way. Thanks for everything.

4 Answers 4

1

I'm assuming that the series and episode are going to have fields and you need to link series and episodes together. Both A and B are technically correct approaches to your problem, but I'd lean more towards approach A(creating a content type for both series and episodes). I'll explain why in a moment.

The series and episode can be linked using the entity reference module as mentioned in an earlier answer. To add more detailx, you would add a multivalue entity reference field to series content type and add all your episodes there.

If you want to store more metadata for the series-episodes link(in Drupalspeak, make that relationship fieldable), you can create a series-episode relation and add fields to that using the relation module.

You can as well make episodes as a taxonomy term and add an entity reference field pointing to episodes(approach B), but series are a separate entity in itself and wouldn't exactly map to a taxonomy term in the grand scheme of things. They are better off as nodes(approach A).

At last is it possible to create Custom Types where for example a javascript is loaded in the background that parses text from a input text area?

Not sure I understand this right. You want to parse some semi-structured text and create series and episode nodes out of that?

2
  • Thanks for your answer and help. Example: I want to add an episode with the fields duration, summary and some links (wikipedia) And this should work like this: A textarea input field: I paste all my information I have structured with a self definied scheme (description:foobar link1:wikipedia.org duration: 50) This area will be parsed with JS and below the textarea are the input fields for description, links, duration. These input fields should than be automatically filled with the parsed text. Maybe I should create my own module to insert episodes? Also looking into views should help me.
    – NameLess
    Commented Jul 24, 2015 at 22:13
  • Maybe a little easier to understand: A semi automatic input page where someone only has to select the series and can add/edit an episode. But I think a modul is the best go to create that.
    – NameLess
    Commented Jul 24, 2015 at 22:59
1

I would do it the A) way and use Entity reference module to "link" episodes to series. That way you can use watever fields you want in your content types (including taxonomy for genre for example).

The Entity Reference Module is used to relate entities (nodes, terms, users, etc...) to one another.

After that, you can display content types with Views showing Series with list of episodes.

0

Have a look at field_collection module. By default a collection (contenttype episode) is part of an entity (series) and can be managed as one bundle.

0

There many ways to implement this as other guys gave you a few solutions. Selecting the right choice deponds on how good you are at Drupal, which fields do you want to filter on, ... .

Searching and filtring on field collection is an almost complex process. The group views by fueld collection is an example of it. But it has the advantage of easily inserting the content. By this moduleva package of fields come together as a one unique field. It is nice.

Using entity module is very good, by this module you will need to create two content types, and link them using an entity field. Searching and filtering is easier than field collection solution.

You can also use Entity View Attachement module which assigns a view to a node. In this case nodes are Series and you assign a View of episoded to them

Anyway I recommend you to use entity module because of it's flexibility in filtering, searching, new requirements in the future and ....

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.