2

I have created a website where users can create their own account expanded by the profile2 module. By using it, users can enter all their information in created fields field like:

  • name
  • father's name
  • mother's name
  • education information
  • etc

I want to display this information publically in table view where it's possible to search, sort and filter. How would it be possible to create something like that?

I know about content types and use content type in Views module.

2
  • use views contexual filters
    – monymirza
    Commented Feb 9, 2013 at 5:20
  • plz dear monymirza , can you explian briefly
    – user13522
    Commented Feb 9, 2013 at 6:17

2 Answers 2

0

The easiest solution for this is use a view. If all your data in stored in the profiles you can simply list the profiles.
If you have several profiles or also need to show data from the user you need to create the view showing users and add a relationship to the profile(s) that have data you need to store.

  • In the field section you can select fields you want to have displayed.

  • In the format you can select the view to create a table, and in the settings you can select which columns should be sortable

  • In filters you can create the filters you want the user to use for search and expose them. Fx add filter for the name field, expose it to users and select "contains", "starts with" or something similar to allow users to search. Beware some of the options can make the search a bit slow.

That should pretty much be it.

0

While creating the View,

  • create View (Show:User)
  • add relationship, (User:Profile); give the Identifier a unique name ie 'MainProfile'; select a single checkbox for 'Profile type', in my case 'Main profile';
  • add another relationship, (User:Profile); give the Identifier a unique name ie 'EducationProfile'; select the other checkbox for 'Profile type', in my case 'Education profile';
  • add Fields to view; select Profile2 field items; use Relationship dropdown in 'Configure field' to associate w/ correct relationship;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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