Skip to content

Instantly share code, notes, and snippets.

@bwente
Last active August 29, 2015 14:15
Show Gist options
  • Save bwente/b2aa6da6e70cf41de116 to your computer and use it in GitHub Desktop.
Save bwente/b2aa6da6e70cf41de116 to your computer and use it in GitHub Desktop.
Plugin to turn off ContentBlocks by default
<?php
$eventName = $modx->event->name;
switch($eventName) {
case 'OnDocFormRender':
if ($mode == modSystemEvent::MODE_NEW) {
$resource->setProperty('_isContentBlocks', false, 'contentblocks');
}
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment