Skip to content

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

License

Notifications You must be signed in to change notification settings

superbigco/craft3-customevents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published