I have a block on the user's profile page that filters content based on the supplied tag as an argument/contextual filter. Users on my site can add tags to their profile (with an autofill field pulling from the free-tag taxonomy) -- these tags are topics that they want to "follow." I would like this block to display content that is tagged with the tags they've personally chosen. thanks in advance!
I have found a solution to this. Using a user view instead of a content view was the way to go for me. Then adding appropriate relationships on the teaxonomy term.
I used the these directions:
- Create a user view.
- Add a contextual filter on user: uid. If no filter value is present, build a default value using the currently logged in user. (This will give you exactly one user object in your view -- the logged in user.)
- Add a relationship, using the relevant taxonomy reference field on the user accounts. This will bring you information about the "interest" term for the logged in user.
- Add another relationship, called "term: nodes marked with term" (or something like that). This will bring you information about all nodes marked with the interest term for the logged in user.
From this article: https://drupal.org/node/1111722
Hope it helps!
I have not done this before, but I would try doing the following first:
- Define a View. Make sure the type of View is "user" and not the default "node".
- Define fields. If you are using Drupal seven, read the article on working with content types and fields:
Fields on user accounts are defined on a site-wide basis on the Manage fields tab of the Account settings page. When you define a field for user accounts, each user account will have that field added to it. For example, you could add a long text field to allow users to include a biography.
- Once you've defined those fields, add them to your View and create a block display within your View. Save your View.
- Add your View block to any of the regions appearing on your /user page.