-
MODX Staff
- 10,725 Posts
This really depends on how you are planning to use the variables. If you are going to work with files in those directories, MODX_BASE_PATH or $modx->config[’base_path’] with get you the full directory path to the folder on the server, i.e. $modx->config[’base_path’] . ’assets/images/foo/’. However, if you are going to use this in a URL, you’ll want to use $modx->config[’base_url’] (or $modx->config[’site_url’] if you want to include the complete URL including protocol, hostname, and base_url).
Yes, I’ll be using the files in those folders. So would the proper syntax be:
$var1 = $modx->config[’base_path’].’assets/images/imagefolder1’;
Just wanted to see if I had every jot and tittle in the right place. Thanks so much for your help.