Dynamic modules events

The dynamic modules that you created through the module builder also expose events you can subscribe to. This article provides a list of all those events and the data they pass in your event handler arguments.

IDynamicContentEvent

This interface is implemented by all events which fire for dynamic modules. Use it if you want to subscribe to all of them. Use the following code to subscribe.

In the event handler, you can access the ID of the currently logged in user.

IDynamicContentCreatingEvent

This interface is implemented by all events which fire before a dynamic content item is created. There's only one such built-in event, but you should subscribe using the interface rather than the class that implements it. Subscribe using the following code.

In the event handler you can access the following information:

  • The ID of the currently logged in user
  • The actual dynamic content item that is going to be created

IDynamicContentCreatedEvent

This interface is implemented by all events which fire after a dynamic content item has been created. There's only one such built-in event, but you should subscribe using the interface rather than the class that implements it. Subscribe using the following code.

In the event handler you can access the following information:

  • The ID of the currently logged in user
  • The date when the dynamic content item was created
  • The actual dynamic content item that was created
  • The Visible property of the dynamic content item.

IDynamicContentUpdatingEvent

This interface is implemented by all events which fire before a dynamic content item is updated. There's only one such built-in event, but you should subscribe using the interface rather than the class that implements it. Subscribe using the following code.

In the event handler you can access the following information:

  • The ID of the currently logged in user
  • The actual dynamic content item that is going to be updated

IDynamicContentUpdatedEvent

This interface is implemented by all events which fire after a dynamic content item has been updated. There's only one such built-in event, but you should subscribe using the interface rather than the class that implements it. Subscribe using the following code.

In the event handler you can access the following information:

  • The ID of the currently logged in user
  • The date when the dynamic content item was updated
  • The actual dynamic content item that was updated
  • The Visible property of the dynamic content item.

IDynamicContentDeletingEvent

This interface is implemented by all events which fire before a dynamic content item is deleted. There's only one such built-in event, but you should subscribe using the interface rather than the class that implements it. Subscribe using the following code.

In the event handler you can access the following information.

  • The ID of the currently logged in user
  • The actual dynamic content item that is going to be deleted

IDynamicContentDeletedEvent

This interface is implemented by all events which fire after a dynamic content item has been deleted. There's only one such built-in event, but you should subscribe using the interface rather than the class that implements it. Subscribe using the following code.

In the event handler you can access the following information:

  • The ID of the currently logged in user
  • The date when the dynamic content item was deleted
  • The ID of the dynamic content item that was deleted

Was this article helpful?

Next article

Ecommerce events