Views: Display number of nodes published by author on profile Using Views, I can create a list of authors, and show the number of nodes that they have published. I've done this using aggregation. The part I can't figure out is how to filter the output based on the user profile that you're viewing. For example, if you're viewing user/1, I want you to see the number of nodes that user 1 has published.

I've tried using different uid contextual filters. In this example, I'm using "User: Uid" as the filter, and I'm trying to pull the uid from the URL by selecting "'Provide default value' &gt; 'Use ID from URL'" in the filter's options. Since aggregation settings are on, you have to apply an aggregation type to the filter, and I'm not sure what that should be set on.

Any feedback would be appreciated. By the way, I'm using Display Suite to build the profile layout, so if there's an easier way to get want I need, I'm open for suggestions. Thanks in advance.

EDIT: For anyone attempting to do this, keep in mind that your output will not show up in the Views preview. I was forced to navigate to a user profile in order to test this. This issue seems to sprout from the combination of aggregation and contextual filters.
In my opinion, You do not need Display suite to achieve this. You can do this in very Simple Drupal way .

1. Your views configuration if perfectly fine. I am just posting my one for reference purpose, Where I did two changes, (1) In the pager setting, I have set the pager item to 1. (2) I removed the User: name as it is not needed. 

Note: You do not need to anything with aggregation setting at filter level.


  


2. From your views it is visible that you have created block.

3. Now, What you need to do is put that block in your user profile, so it looks like as a one of the field of user profile.

4. How to do that:

4.1 Place that Block under  Main page content in Content region on as shown in following image.


  


4.2 Set the display rule for this block as shown in following image. So what happens, the block are visible only on the user profile page.


  


4.3 Set the Role permission for the User Role, so other user can see teh profile page of other's Or anonymous users also can see teh profile page of other's: I am sure you are aware of all this.

5. Output Image: As you can see, I have tried in my Bartik theme. I have just given block title,  So it can distinguished in the image. Note: I have removed User:name field from the views, as it is not necessary. The views will automatically detect from the url.  


  


**Other example from other login **


  


Hence, this way without using any other display help, you can add the new field in the User profile. So you do not have to much play with the User profile page.