CiviCRM uses profiles to display contacts, and in most situations this is an excellent solution to displaying and sorting your membership contacts.
However, displaying membership contacts can be a problem in CiviCRM. For example, you may have a membership setup that allows both individuals and organizations to join. CiviCRM does not allow you to have a profile that combines both individual and organizational data. So, you cannot use the profile solution for your directory.
Using this recipe, we can use Drupal's Views module to create a membership directory that includes organizations and individuals.
Download, install, and enable Drupal's
Views
module, available at http://drupal.org/project/views.In Drupal, navigate to Admin | Structure | Views and add a new view.
Set the view to show CiviCRM Memberships.
Name the view Membership directory.