Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

views_vcards

343 sites Security covered
View on drupal.org

Overview

This module aims to provide a vCard attachment for views in a similar way as the views built-in feeds system does. With the flexibility of views, these fields can come from a user, node or referenced entity. After assigning the fields to their vCard properties, this data can be presented in a downloadable vCard.

Basic concepts

This module is based on the way the views module builds RSS and XML feeds. By selecting several fields from a (user) entity and assigning them to specific vCard fields, a complete vCard can be constructed.
When the view contains one vCard, it is delivered as it is. When a view contains multiple vCards, they get zipped before the download starts. This also works for exposed filters.

For the 3.0.0 branch I've tried to stick as much as possible to the vCard 4.0 standard. If you however want to use the 3.0 or 2.1 standards for compatibility reasons, you are able to override the views-vcards-view-row-vcard.html.twig template and make changes where needed.

Installation

Install this module using composer to also get the right zipping library.

Configuration

  1. Create or edit a View showing users (any entity will do, but users make the most sense), then create a new display of type 'vCard'. In this display choose vCards for both 'Format' and 'Show'. The Show settings dialog will allow you to select which field should be used for each vCard property.
    • Make sure the fields you want to use are added in the fields section,
      otherwise they will not show up.
  2. Views vCards offers the 'attach to' option under vCard settings, allowing this module to add a download link to another display. You can for instance set up your user list view as normal with all (exposed) filters if you require them, attach the vCard display to this and the vCard export will adapt to the set filters and provide the right vCards.

Be careful with the display of usernames or email addresses in vCards and double check who has permissions to access the view because it could lead to information disclosure.

Common pitfalls

  1. Since Drupal 9.2 there is a permission to allow users to view other user's email addresses. Please refer to this change record: https://www.drupal.org/node/3070293. Having the permission disabled makes that no email addresses are included in vCards. Alternatively you can choose not to use the user's system mail address and use a separate field for it instead.
  2. To avoid vCards with embedded images becoming very large, make sure to apply an appropriate image style to the image field.
  3. When you see strange characters in the generated files, please check if the field is not being output as link.

Dependencies (Drupal 7)

Activity

Total releases
1
First release
Jun 2025
Latest release
9 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
3.1.1 Stable Jun 23, 2025