3

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

  • 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 '13 at 7:46
3

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 default 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.

|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 '13 at 5:06
  • hi...i figured it out..i passed it as a view and gave it an argument – user145078 Mar 14 '13 at 5:12
1

Try the Entity Views Attachment (EVA) module: it lets you add user entity data into the view. Here is an excerpt about it from the module's project page:

... provides a Views display plugin that allows the output of a View to be attached to the content of any Drupal entity. The body of a node or comment, the profile of a user account, or the listing page for a Taxonomy term are all examples of entity content.

The placement of the view in the entity's content can be reordered on the "Field Display" administration page for that entity, like other fields added using the Field UI module.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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