Update event handling for templates