-
- 21 Posts
I thought this would be a simple constant or context setting but I can't find it. How do I reference the active context path within a snippet?
E.g.,
/var/www/html/web/ might be the default context, MODX_BASE_PATH
/var/www/html/alt/ is a second context... how do I reference this, without redundantly manually defining a context setting with this value?
-
- 24,544 Posts
The context object itself doesn't have a path. I don't think there's any way to do it without creating a Context Setting. Once you do that, you can access it like this, since Context Settings will override System Settings:
$path = $modx->getOption('setting_name');