Sunday, November 21, 2010

useful modx 2 variables

PHP Constants:
MODX_BASE_PATH - dir path to index.php (root)

MODX_ASSETS_PATH - dir path to assets
MODX_ASSETS_URL - url to assets

MODX_CONNECTORS_PATH - dir path to connector
MODX_CONNECTORS_URL - url path to connector

MODX_PROCESSORS_PATH - dir path to processor: example: core/model/modx/processors/

MODX_CORE_PATH - dir path to core

MODX_SITE_URL - domainurl
MODX_HTTP_HOST - hostname / domain

MODX_URL_SCHEME - http:// / https://

MODX_MANAGER_PATH - dir path to manager
MODX_MANAGER_URL - url to manager

$modx->context->get("key"); // get context name
$modx->context->getConfig("upload_maxsize"); // example of getting upload max size

MODx.config.http_host, example
MODx.config.http_host_remote, example
MODx.config.site_url , example:
MODx.config.assets_path, example "/assets/"
MODx.config.connectors_url, example "/connectors/"
MODx.config.manager_url, example "/manager/"
MODx.config.template_url, example "/manager/templates/default/"

No comments: