0

I use Moxiemanager as a standalone plugin (just including moxman.loader.min.js).

This file calls api.php, where MOXMAN class initialises with default config.php file.

// Load default config
if (!isset($moxieManagerConfig)) {
    $moxieManagerConfig = array();
    require_once(MOXMAN_ROOT . '/config.php');
}

What would be the best way to pick different configs for different pages?

For example on 1 page i would like to change autoformat rules and on another change folder path.

Can i pass a parameter somehow? Or define a constant?

1 Answers1

1

Ok, i found that the easiest way would be just to have a separate folder for images with mc_access file where we can redefine the settings.

  • Create a folder
  • Set rootpath to this folder in js
  • Put ms_access file with redefined settings.
  • How do you set the rootpath in JS? – Chris M Mar 05 '18 at 10:52
  • 1
    rootpath is one of the options you can pass to `.browse()` method. Here is the documentation https://www.moxiemanager.com/documentation/index.php/js_browse So you will call it like `moxman.browse({rootpath: 'PATH', ...});` – Anatoly Lagodich Mar 05 '18 at 19:08