-
☆ A M B ☆
- 1,231 Posts
Hello, I want to write a plugin that executes when a specific document is accessed in the manager area but I’m not sure if there’s a way to know which document is which. I know $modx->documentIdentifier; works on the front end but doesn’t appear to be the same on the management area.
Does anyone know a solution?
Thanks!
2 minutes later....
$_GET[’id’] seems to work fine, is there a preferred solution?
-
☆ A M B ☆
- 24,524 Posts
$_GET[’id’] is the way MODx itself specifies the resource being accessed. Since the resource in question isn’t being parsed, the usual document variables and arrays aren’t available.
-
☆ A M B ☆
- 1,231 Posts
Thanks Susan, that makes sense. $_GET[’id’] works great.