Sitecore PowerShell Extensions
Slack
YouTube
Stack Exchange
Donate
Search…
Introduction
Disclaimer
Installation
Training
Community
Interfaces
Working with Items
Modules
Libraries and Scripts
Integration Points
Content Editor
Control Panel
Data Sources
Event Handlers
Functions
ISE Plugins
Page Editor
Pipelines
Reports
Tasks
Toolbox
Web API
Workflows
Packaging
Remoting
Security
Releases
Troubleshooting
Code Snippets
Appendix
Powered By
GitBook
Event Handlers
The Event Handler integration provides a way to execute scripts when defined events are fired.
Steps required to activate this integration include the following:
1.
Enable the
Spe.Events.config
or apply your own patch with the required events enabled.
2.
Add a new integration point library to your new or existing module.
3.
Add a new script to the appropriate event library.
4.
Configure an
Enable Rule
if needed.
5.
Profit!
Enable Configuration
While SPE comes with an example configuration, which is disabled by default, it contains several events that may not meet your requirements.
An event configuration patch may look like the following:
1
<configuration xmlns:patch="https://www.sitecore.net/xmlconfig/">
2
<sitecore>
3
<events>
4
<event name="item:added">
5
<handler type="Spe.Integrations.Tasks.ScriptedItemEventHandler, Spe" method="OnEvent" />
6
</event>
7
</events>
8
</sitecore>
9
</configuration>
Copied!
Add Event Script
To mimic the event
item:added
you should create nested script libraries such as
Event Handlers -> Item -> Added
followed by a script.
Item Added Event Handler
Previous
Data Sources
Next
Functions
Last modified
2yr ago
Export as PDF
Copy link
Contents
Enable Configuration
Add Event Script