Skip to content

Latest commit

 

History

History
60 lines (34 loc) · 1.26 KB

README.md

File metadata and controls

60 lines (34 loc) · 1.26 KB

Custom Events plugin for Craft CMS 3.x

Trigger custom events from templates and plugins that other plugins can hook into.

Screenshot

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require sjelfull/custom-events
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Custom Events.

Custom Events Overview

-Insert text here-

Configuring Custom Events

-Insert text here-

Using Custom Events

Create an event

{% do craft.customEvents.createEvent('viewedProposal') %}

Create an event for an element

{% do craft.customEvents.createEventForElement('acceptedProposal', entry) %}

Tracking pixel that can be used in emails or by a JS function to trigger an event

 {% set url = craft.customEvents.getPixelUrl('openedProposalEmail', { element: entry }) %}
 <img src="{{ url }}" alt="">

Custom Events Roadmap

Some things to do, and ideas for potential features:

  • Release it

Brought to you by Superbig