statikbe / craft-contacts
Adds a crm-like layers over Craft's users
Installs: 161
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Type:craft-plugin
pkg:composer/statikbe/craft-contacts
Requires
- php: >=8.2
- craftcms/cms: ^5.7.0
- openspout/openspout: ^4.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
This package is auto-updated.
Last update: 2025-11-07 12:34:54 UTC
README
Adds a crm-like layers over Craft's users
Requirements
This plugin requires Craft CMS 5.7.0 or later, and PHP 8.2 or later.
Installation
You can install this plugin from the Plugin Store or with Composer.
From the Plugin Store
Go to the Plugin Store in your project's Control Panel and search for "Contacts". Then press "Install".
With Composer
Open your terminal and run the following commands:
# go to the project directory cd /path/to/my-project.test # tell Composer to load the plugin composer require statikbe/craft-contacts # tell Craft to install the plugin ./craft plugin/install contacts
Features
- Contact Management: Create and manage contacts as inactive users
- Advanced Filtering: Save personal and shared filters for quick access
- Export Functionality: Export contacts to XLSX format
- User Conversion: Convert contacts to active users with activation emails
- Field Layout Customization: Control which User fields are visible for contacts
- Relations Table Template: Display related data in clean, formatted tables
Displaying Related Data
The plugin includes a flexible relations table template for displaying related data on contact detail pages.
Relations Table Template
Include the _relations-table.twig template to display any related data in a formatted table:
{% set columns = [
{label: 'Title', key: 'title', link: true},
{label: 'Status', key: 'status'},
{label: 'Created', key: 'dateCreated', type: 'date'}
] %}
{% include 'contacts/_relations-table' with {
title: 'Related Entries',
columns: columns,
rows: relatedEntries,
emptyMessage: 'No related entries found.'
} %}
Column Configuration
Each column supports the following properties:
label(string): Column header labelkey(string): Property key to access in row datalink(boolean): Whether to link to element's CP edit URL (default:false)type(string): Format type for cell value (default:'text')
Supported Column Types
text: Renders value as-is (supports HTML)date: Formats date using|date('short')datetime: Formats datetime using|datetime('short')timestamp: Formats timestamp using|timestamprelation: Resolves relation field and displays title (automatically linked)dropdown: Displays dropdown field label instead of value
Example: Display Registrations
{# Get related registrations for this contact #} {% set registrations = craft.entries() .section('registrations') .relatedTo(element) .all() %} {% set columns = [ {label: 'Registration', key: 'title', link: true}, {label: 'Course', key: 'course', type: 'relation'}, {label: 'Status', key: 'registrationStatus', type: 'dropdown'}, {label: 'Date', key: 'dateCreated', type: 'date'} ] %} {% include 'contacts/_relations-table' with { title: 'Registrations', columns: columns, rows: registrations } %}
This will display:
- Registration: Clickable title linking to the registration entry
- Course: Related course title, linking to the course entry
- Status: Human-readable dropdown label (e.g., "Pending Approval")
- Date: Formatted date (e.g., "Jan 15, 2024")
All links open in a new tab to preserve the contact detail page.