Events
Masa CMS is extremely customisable and one of the ways to achieve that is through events. In this section of the documentation the event hooks are explained and listed, you’ll learn about the event lifecycles and we explain how to write event handlers.
Lifecycle events
A lifecycle event is an event that gets triggered on every single request, whether it is a front-end request or a request to the Masa CMS administrator.
An example of a lifecycle event is onSiteRequestStart
that is triggered early on every front-end request or the onPageBodyRender
event that is triggered when the body of a Page is rendered.
Contextual events
Events that aren’t triggered on every request, but only when a specific action is executed, are contectual events.
The onSiteLogin
event is an example of a contextual event, it is only triggered when a user logs into the website.