contextual filter author id

489 Views Asked by At

Ok, so here's my problem. I feel it's really very simple and I am missing something. I have a Drupal 7 view which shows a certain type of content. Say it has a url mysite.com/article. What I want is, if the url is like mysite.com/article/me, it would load the articles posted by this current user. "me" will always be "me" and would not take any id/username.

Hope the problem is clear. Thanks

2

There are 2 best solutions below

0
On
  1. Add the filter "Content: Author uid" in your contextual filter;
  2. Check "Provide default value";
  3. Select "User ID from logged in user".

And to distinct all articles with articles by author you need to create separated views/panels.

1
On

Find screenshot for contextual filter setting

Use contextual filter as screenshot.