Last active
June 19, 2025 14:41
-
-
Save matdave/fc6150915e916fb35ce66984c4a03c72 to your computer and use it in GitHub Desktop.
No Manager - MODX Output Modifier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* No Manager Output Modifier | |
* Use to disable items from being shown if a user is logged into the manager | |
* Useful for disabling analytics chunks | |
**/ | |
if (!empty($modx->user)) { | |
if ($modx->user->hasSessionContext('mgr')) { | |
return ' '; | |
} | |
} | |
return $input; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment