2

I need to tag my users as belonging to a 'workplace'. And then display a page with workplace details and a list of associated users.

I have setup a vocabulary in Taxonomy called 'workplace' and I can easily tag a user. I need to know how to create a block that will show on a taxonomy / term / id page and show tagged users.

I imagine I will have to make part of the user details public as well as by default they won't be?

Any help much appreciated - even a hint as to where to start ...

1
  1. Since users are field able you can now attach a taxonomy term reference field to users.
  2. Create a view that list all users where the tid of the term reference is a select value. You could also get the value from a url arg.
  3. The view itself should show the user data you want to display, maybe as a list or whatever fits you better.
  4. In the views header you could display the info about taxonomy term. Right now this will require some views knowledge and some custom code, as you need to create what views calls an area handler, to display the info. You could also do this in a preprocess function instead.
  • Thanks that is great. If I want to store fields associated with the 'Workplace' i.e. location, details etc is it good practise to add fields to the 'term' or should I create a content type and use the 'term' to create the one to many relationship between the 'workplace' and it's many 'users'. – user1867 Jul 6 '11 at 10:11

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.