The S-Files: "A view that displays a user's content"
UPDATE: I think this recipe is deprecated by the Views Attach module which addresses the use case directly: http://drupal.org/project/views_attach
Tech Support Case Studies
My duties at Acquia include answering the phone when European clients call needing support. Today I helped someone who needed a way for their site users to be able to find the content that they had authored. The recipe I suggested involves making a view that displays all content filtered by a particular user id. By having the view provide a block display you can then put that block on the user's profile page and they always have a place to go to find the latest content that they've created.
I provide an outline of the steps for this view below, but if you are in a hurry you can download the exported view and import it for yourself. You can also download a PDF file of all the screenshots I made while creating the view.
- Create a new view. The base table should be nodes.
- I modified the display to be HTML list values. I then added the title and type fields. The display and fields you choose, however, can be whatever you need. This is totally up to your needs.
- I added an argument. Arguments are bits of information that come in via the URL (path) which tell the view how to filter. In our case we want the view to filter on the user id, so we have to add a User: Uid argument.
- The trickiest part of this whole tutorial is how to configure the argument. See page 10 of the PDF for a screenshot. It is important that you choose the option "Action to take if argument is not present: Provide default argument." This is because we're creating a block view, and block views don't automatically take arguments from the URL like other views can. Thus we assume the argument is not present and provide it manually.
- Fortunately there is a complimentary option "Default argument type: User ID from URL." That is just what we need! Now the view will know that the integer present in the URL is to be interpreted as the user's id, and that it should use that number to filter the view.
- I then added a block display to the view, and saved the view. Don't forget to save the view!
- Now it's time to configure the block to appear on the user's profile pages.
- Viola! All done.

Acquia helps you succeed in building your websites by providing expert technical advice and support.


Comments
This might be a good
This might be a good candidate for the expanded D7 install profile (or even part of the per user dashboard in some way). For bonus points, show unpublished status plus quick edit links.
Actually, the same client is
Actually, the same client is using the Publish Content module to add those publish/unpublish links. That was in fact, the essence of his use case. I just abbreviated the case study.
Robert Douglass
Senior Drupal Advisor, Acquia
Great idea. Much
Great idea. Much appreciated. Implemented on my site as soon as I saw it here.
Hello Robert, I have some
Hello Robert, I have some problems with step 4. I checked your PDF but I seem to cannot find the clue. Can you help me out?
Greetings,
Debra@ Anxiety Cures
Greetings! I tried to have
Greetings!
I tried to have the same results with comments made by the user. The problem is that it displays the comments made in *own* nodes and not *all* comments.
Any tip on what Fields/Filter can enable a view of a selection of all comments including both of those made on others' nodes as well as own nodes.
I think this recipe is
I think this recipe is deprecated by the Views Attach module which addresses the use case directly: http://drupal.org/projec t/views_attach
Robert Douglass
Senior Drupal Advisor, Acquia