2

I'm creating a dev portal for a client's software, and they would like to have nodes pertaining to different versions of the software in the documentation.

Rather than have to make an entire new set of nodes for each version of the software, I would like to be able to add/edit a 'version' of the node that pertains to 1.x 2.x etc, within the node edit screen, and control what version the end user sees with a custom module and/or $_GET variable.

My first thought is to use the translation module since this is essentially the same thing, albeit with languages instead of software versions, but I was wondering if anyone had any ideas of what method I should go about doing this?

2
  • Is the set of nodes you're referring to a cluster of Documentation Topic items describing various topics related to the client's single software product, or does the client have multiple products, with a set of Documentation Topic items for each product?
    – bdurbin
    Oct 30, 2015 at 17:16
  • The client has 1 product, with different releases (liked drupal 7, 8 etc)- Some of the documentation will carry over to the new version, some will change- but I need them to be able to view and edit the different versions of the node on the node edit screen.
    – Jordan
    Oct 30, 2015 at 18:19

2 Answers 2

0

In this case, go with taxonomy terms. That way you can organize content around a taxonomy term, one for each version. You can even tag content that is applicable to multiple versions just by selecting taxonomy terms.

Then, you could create a view that says "give me all of the content related to version X" and you'd be able to see those. Plus if you ever wanted to do more than "just nodes" e.g. other entities or bundle types, you can just add the field to those bundles and go on your merry way. Plus, since taxonomy terms are entities, you can add fields and content to those terms and build pages that surround those terms.

5
  • Thank you for this answer. Taxonomy was my first thought, but within the node edit screen it's impossible to switch between 2 different versions of the node to easily edit and compare the different versions. The content editor must create an entire new node with the other version selected, so I'm not sure how to solve for that.
    – Jordan
    Oct 30, 2015 at 18:16
  • If you simply want to be able to compare two versions of the same page, then you could probably extend the diff module appears to be able to diff between different nodes so you could just wrap around that functionality.
    – nvahalik
    Oct 30, 2015 at 18:36
  • I think it's more than that. Content editors need to compare versions and end users need to be able to view the different versions depending on what version they've selected. It's a dev reference, so think of it like switching from drupal 7.x-1.1 to drupal 7.x-1.2 - you still need to be able to view 7.x-1.1 some how.
    – Jordan
    Oct 30, 2015 at 19:05
  • This module is the closest I've found, but only available in 6.x
    – Jordan
    Oct 30, 2015 at 19:09
  • What's probably even closer than that is the API module but if your product isn't Drupal-based, then you're out of of luck. Is there a particular reason you want Drupal to do this? There are other products out there that are much better at generating branch-based documentation for code (many which have doxygen integrations)... if your goal is to generate software docs, you might want to look at one of those solutions instead.
    – nvahalik
    Oct 30, 2015 at 20:37
0

I am trying to do this same thing for a very similar purpose: to provide documentation (articles, videos, etc) for two different versions of the same software product.

My solution so far is to use field_group, and create horizontal tabs. Each tab contains a content textarea which has the documentation relating to THAT particular version.

So at the top of the node (view and edit) you see these tabs:

Installation Guide
    6.x | 5.x | 4.x

And switching between the tabs shows you different content.

There are some drawbacks to this solution, but it's the best I can come up with for my situation.

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.