How to load different configs for MoxieManager

878 Views Asked by At

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

There are 1 best solutions below

2
Anatoly Lagodich On

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.