Skip to content

Instantly share code, notes, and snippets.

@jedateach
Created December 16, 2013 23:42
Show Gist options
  • Save jedateach/7997127 to your computer and use it in GitHub Desktop.
Save jedateach/7997127 to your computer and use it in GitHub Desktop.
Optionally hide SilverStripe LeftAndMain/ModelAdmin sections
<?php
class MyAdmin extends LeftAndMain{ //or ModelAdmin
private static $url_segment = "myadmin";
function alternateAccessCheck(){
return !$this->config()->hidden;
}
}
@jedateach
Copy link
Author

to use, add:

MyAdmin:
   hidden: true

to your config.yaml file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment