3

I want to list all the users who have ever contributed to the revisions of a node.

  • 2
    you could see them on http://your-site-url/node/%nid/revisions just replace %nid by the node-id of the node. – AjitS Jul 16 '12 at 7:02
7

Use The Views Module To Create A Custom Block

If you're using the Views module you can create a view that will show you what you need.

Create a new view (admin/structure/views/add) and choose 'Content Revisions' as the view type.

Create a new view

Add the 'Node Revision: User' relationship so that you can access the username of the user that made each edit.

Node Revision: User

Add a 'Node ID' contextual filter to your new view.

contextual filter

When the filter value is not available you should provide a default value. Choose the Content ID from URL.

contextual filter settings

Add the field 'User: Name' but be sure to select the relationship you created earlier as in the graphic. You may also want to add a link to view the revision or see when the revision was created.

User: Name

You can optionally sort by "Content revision: Updated date" desc to ensure the block is easy to follow.

The last step is to go to 'admin/build/block' and enable the new block for the appropriate content types.

Lastly, one of my favorite resources for views comes from NodeOne's insanely talented Johan Flak. If you're new to views check out http://nodeone.se/sv/node/20

Also, as @indrock said in his comment, you can also see the history of a node's revisions at http://your-site-url/node/%nid/revisions This is a much simpler solution and I wish I would have seen it before I went views crazy.

  • 2
    Just an addition: you can add user name twice and add aggregation to remove duplicate entries. – kalabro Jul 16 '12 at 12:28
  • 2
    Nice use of screenshots to show some of the less obvious Views features. – mpdonadio Jul 16 '12 at 22:43
0

Try to use Content revision: Nid as a contextual filter instead.

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.