diff --git a/varnishpurge/VarnishpurgePlugin.php b/varnishpurge/VarnishpurgePlugin.php index 9554eb6..bd03587 100644 --- a/varnishpurge/VarnishpurgePlugin.php +++ b/varnishpurge/VarnishpurgePlugin.php @@ -74,6 +74,9 @@ public function init() if (craft()->varnishpurge->getSetting('purgeEnabled')) { $purgeRelated = craft()->varnishpurge->getSetting('purgeRelated'); + craft()->on('structures.moveElement', function (Event $event) use ($purgeRelated) { // element moved inside structure + craft()->varnishpurge->purgeElement($event->params['element'], $purgeRelated); + }); craft()->on('elements.onSaveElement', function (Event $event) use($purgeRelated) { // element saved craft()->varnishpurge->purgeElement($event->params['element'], $purgeRelated);