Drupal Association members fund grants that make connections all over the world.
Description: This tutorial is one of a tutorial series I wrote on the Turkish Drupal Community site (http://www.drupalturkiye.org). These tutorials have been written upon requests of site members and due to the need of quick help, they are not so detailed. Because they have not been tested much, I cannot assure readers that they work flawlessly in every situation.
Any correction of both the content and my English would be appreciated.
For this tutorial, it is assumed that you have fundamental knowledge of related Drupal basics like creating and modifying views, content types etc. And it is also assumed that you have created enough users and content to practice with so as to able to test this tutorial.
Purpose: Listing other contents by author (user) in a block while showing content by the same author (user).
1. Start creating a new view by clicking "Add new view" link under Admin > Structure > Views.
a) Type "Other Contents by Author" in "View name" text box.
b) [Optional step.] You can check "Description" checkbox and write a description for view. If you wish, check and write "A list which contains other content by author."
3. Select "Content" from the "Show" select list.
4. Uncheck "Create a page".
5. Check "Create a block". You can enter any block title you wish. To limit the items shown in block, type a number in the "Items per page" text box. (You can change it later.)
6. Click "Continue & edit". At this stage, it is a good idea to click the "Save" button after each alteration/change to save the View.
a) Click the "Advanced" link in right side of the page (if the pane is not open).
b) Click the "add" link in CONTEXTUAL FILTERS row.
c) Check the "Content: Author uid" checkbox from the "Add contextual filters" popup.
d) Click "Apply..." button.
e) Check "Provide default value" option in the WHEN THE FILTER VALUE IS NOT AVAILABLE section.
f) Select "User ID from URL" from the "Type" select list.
g) Check "Also look for a node and use the node author" checkbox.
h) Click "Apply..." button.
a) Click "add" link again in the CONTEXTUAL FILTERS row.
b) Check "Content: Nid" checkbox from the "Add contextual filters" popup.
c) Click the "Apply..." button.
d) Check "Provide default value" option in the WHEN THE FILTER VALUE IS NOT AVAILABLE section.
e) Select "Content ID from URL" from the "Type" select list.
f) Scroll down to the MORE section and check the "Exclude" checkbox.
g) Click the "Apply..." button.
9. Click the "Save" button and save the view.
You can add different fields and filters and make changes to create solutions for different needs.
Next tutorials related to this (coming soon):
- "Author info" block with Views (Drupal 7)
- "Authors (with latest post)" block with Views (Drupal 7)
(Turkish version of this tutorial/Bu dersin Türkçe sürümü: http://www.drupalturkiye.org/drupal-dersleri/97/views-ile-yazarin-diger-...)