Skip to content

Instantly share code, notes, and snippets.

@benjamindean
Last active August 29, 2015 13:58
Show Gist options
  • Save benjamindean/10101725 to your computer and use it in GitHub Desktop.
Save benjamindean/10101725 to your computer and use it in GitHub Desktop.
MODX switch/case by context snippet
<?php
if($modx->context->get('key') != "mgr"){
switch ($modx->context->get('key')) {
case 'web':
//Condition
break;
//More Contexts
default:
case 'web':
//Condition
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment