1

Is there a way to add a relationship to the node history table in views. If not, is there a module which can do it?

As it turns out the history table is already available under views as part of the content section (field 'Has new Content').

2

Download Views Field View module and install it.

Next create a new view that shows content revision instead of content. See image below.

View Creation Screen

Pull in the fields you want to see. See Image below.

View Field Add Form

Add a views contextual filter. See Image below.

Views contextual filter

Add the Content: Nid field as the contextual filter. Image below.

Views Content: Nid Contextual Filter

Configure the field as below.

enter image description here

Next edit your original view that pulls over the current content. Add a field and select the Content: Nid. Make sure to uncheck the Create Label checkbox. We just want the number. Then check the exclude button.

enter image description here

enter image description here

Now we add the views_field_view to the view via the field section of the view. You should select Global: View.

enter image description here

Now we configure it like the image below.

enter image description here

Save your view and now you should be able to go and see each node along with the historical data.

  • Thank you for a very well presented answer. I was however looking for information on the history table, and not node revisions. – J. Reynolds Aug 2 '14 at 10:45
  • The history table only contains UID, NID, and TIMESTAMP no other information. The table is for who has read what. This is the description text from the table 'A record of which users have read which nodes.'. Is this the data you are looking for? If so I'll look into finding it. – FatGuyLaughing Aug 4 '14 at 14:38
  • I have already updated my question above. As it turns out the history table is already available under views as part of the content section (field 'Has new Content'). And there is a patch to bring the User into it as it is not present by default. Multiple filed handlers in Views for a field. – J. Reynolds Aug 5 '14 at 6:24
  • Sounds great, I'm glad it worked out! – FatGuyLaughing Aug 5 '14 at 14:08
0

As it turns out the history table is already available under views as part of the content section (field 'Has new Content'). It is just a bit limited in use as it brings in the current user only as a user relationship.

Luckily there is a patch to fix that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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