1

I describe my scenario:

the users in their profiles must display a view (views module) with a list of fields that the admin adds each time;

I assume that the admin must add this fields from a specific content type and display this fields with a views.

My question is: how I can associate the fields of this content type to an user and how I can display in the view only the fields of the nodes that the admin have associated to the user that are displaying the view?

Any help is appreciated. Also change my approach if need.

Thank you in advance.

EDIT

Solve

I solve the issue:

  • Created a new content type;
  • Added a user reference field to the new content type;
  • Created a view that displays only this content;
  • Added a filter in the view to reduce it to only nodes that reference the currently viewing user;
  • Created a block in the view and place it to be only displayed on the user profile page;
1

With views you can display tables of items which are related to each other, like content users have created or fields of specific nodes of content.

Your question is not entirely clear. If you want to only show specific fields of a content type to a specific user those fields must be filtered by user ID, using a contextual filter.

If you want admins to be able to specify which fields are shown to which users you may want to use flags, and then filter your view of content on the flags which have been set.

If you can explain in more detail exactly what you are trying to do I may be able to help more.

1
  • Thank you for reply. Periodically the admin has to add some info to show to the user. The user must display only the info added for him. I think that the best way is make a content type; the admin add a content; this content will be displayed to the user. How the admin can associate the node to the user and how I can make a views to show only the node associated to user (the node is added by the admin, not by the user)? – kb8 Feb 11 '16 at 11:27

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.