Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I want to create some views that shows the content created by the user, content flagged by the user and so on. I also need that when user a views user b then user a can see the content created by user b and so on. So i though i under Contextual filter i passed a default values as User Id from url. However when i visit the page i just see the view heading and no content.Please Help

Regards

share|improve this question
just to be clear i dont want the logged in user but the user being viewed hence user id should be passed from url i guess – user145078 Mar 13 at 7:46
add comment (requires an account with 50 reputation)

2 Answers

Create a new Views view with Format, Fields, and Filter criteria configured as needed.

Then do the following:

  1. Under Advanced, add a new Contextual filter for Content: Author uid.
  2. Choose Provide deault value and select User ID from URL.
  3. Under Page settings, set Path to user/%/myview.

Now when you navigate to user/1/myview you should see content from user 1.

For Flags you need to add a relationship for the flag and filter by it. I believe this answer would help with that.

share|improve this answer
hi..well it works but if a assign this page as a call back to a quciktab instance as user/%/myview...then it shows nothing – user145078 Mar 14 at 5:06
hi...i figured it out..i passed it as a view and gave it an argument – user145078 Mar 14 at 5:12
add comment (requires an account with 50 reputation)

Try the 'entity views attachment' module:

http://drupal.org/project/eva

It lets you add user entity data into the view.

share|improve this answer
add comment (requires an account with 50 reputation)

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.