I've noticed that someone has created a tab in their documents that says "linked documents" and it contains a manual list of all documents which have been defined as "related." It creates a two way link between the documents. For example, let's say you wrote an article on the Jackson Five music group. You also wrote a second article on michael jackson himself. You want to create a relationship between the two so you link the documents and there is a link two ways between the Jackson Five and the michael jackson article. Let's say there is another article about janet jackson talking about michael. You create a link between janet doc and mj doc. So now it looks like this.

jackson five <-> michael jackson
janet jackson <-> michael jackson

Under the tab for the MJ document:

Related Documents
-------------------------
Jackson Five Article
Janet Jackson Article

In the tab under michael jackson for "related documents" it will show the title of these two documents and a link to both documents. It's a great feature and it it's close to tags but it is NOT tags. That is because if you used the "michael jackson" tag it would be seen on all THREE docs. It would also related the jackson five article to the janet jackson article because all three would have the same tag. But in fact, the jackson five article should not be a related article to the janet jackson article. Hope this makes sense and appreciate any help!

Comments

steeph’s picture

OK, I see why you don't want to use taxonomy. In that case, maybe the Relation module can be of help.

I did something similar for a music website once. In this project there were different content types for artists, publications, articles, etc. I used node relation fields on all these content types to relate nodes to artist nodes. That worked very well. I also used tabs for content related to the currently displayed content. Most importantly, an artist page had tabs for publications, related artists (band members or a band respectively), news articles, photo albums, and so on.

A few examples:

  • On an artist node, you could choose existing artist nodes. So for a band member, you would select the previously created band.
  • On a publication node for an album, you could choose artists that were involved in creating the album. Either a band, a single artist or both the band and its members.
  • On a photo album node, you could choose artists that are in the photos.
  • On a lyrics node, you could choose artist nodes and publication nodes.

I think you get the principle. If not, feel free to ask for details.

slinky’s picture

Many thanks and very interesting. So you'd have two content types, e.g. artists and and a photo albums. An artists node (an individual artist) could then be related to a photo albums node (perhaps a serious of photos at an event) and thus you'd have a list of artists who appeared in a particular event photos. What you did is comparatively rocket science to this project, lol, which only links two nodes together that are of the same content type in an arbitrary fashion chosen by users.

The tabs is the next item on the agenda since the module isn't clear on setup, both relation and display. There are a couple of YouTube videos I found that help although it is a tad awkward. This is a key feature and I'll also test it out on Drupal 8, which is one of those things I'm questioning whether it's wise at this early stage. I'm going to need to play with this a while to get certain things set up and I appreciate the assistance. If you're available for some work as well, I'm going to need some assistance from an experienced Drupal developer to complete what I'm doing within the appropriate time frame. Feel free to let me know too. :) Thanks again for the detailed information and leading the horse to water.

steeph’s picture

So you'd have two content types, e.g. artists and and a photo albums. An artists node (an individual artist) could then be related to a photo albums node (perhaps a serious of photos at an event) and thus you'd have a list of artists who appeared in a particular event photos.

Yes, whereas the artist node is created first and every time you create a new photo album, there is also a field to select the artist nodes. Not the other way round.

In my case I only used node relation fields. You can do this with just one content type as well. But it looks to me like the Relation module is made exactly for your use case (and more). So have a look into that too. Maybe it's easier. I don't know how far development for Drupal 8 is with this module. At least there is a dev release. If it isn't usable yet, and you go with Drupal 8, you can still fall back to the node relation field version.

For the tabs, the cleanest way would be to create a custom module to add the tab. If you want to do it in the Drupal UI, one way would be to use Views to display the articles. In the view you can add a second display for related articles, and set this display to be displayed as a tab on the article page.

slinky’s picture

Thanks much. I've installed the Relations module and realize that I was using some other module (maybe the relation entity collector block) but the relation field using the back end (CCK?) makes everything work perfectly. I was able to set up three content types and then relate them as you mentioned. There is a need for a parent-child-child relationship. By using CCK I was able to have the fields appear as needed where they should appear and they are set up in one place (the child is where the relationship is defined to a parent.)

I am having a difficult time understanding why some things such as a tab require a "custom module" to do. It seems odd that this isn't something you'd be able to do more easily. I'm starting to learn Views, which is very powerful. It's neat how much you can do but it's a bit odd to feel like there is so much power while, at the same time, feeling like everything is only 80% done. While there are many content management systems, there is a lot in Drupal that still makes it much easier and quicker to do than considering coding. Thanks much for leading me toward answers and understanding.

steeph’s picture

I am having a difficult time understanding why some things such as a tab require a "custom module" to do.

Well, you can do it in views. I was just thinking it would be more resource-saving or clean to do it in a custom module. In general, if you want to do something in Drupal that is not supported out of the box, you have two options: Install an existing extension that does what you need or build one yourself. You can change and add almost anything by using additional code, without losing the changes with the next Drupal update. That's what all the contributed modules do, in the same way as custom modules.

In this case it's just one tab. There is probably a module out there that does this. My thinking was for just one tab it might be just as easy to create a custom module instead of searching for an existing one and configuring it. But if you are just getting to know Views now, you might want to add the tab in the view for now. You are right, it is very powerful! And it's very useful to know how to use arguments and relationships in Views.