How to define a dynamic folder in CKFinder?

1

I'm breaking my head to define a dynamic folder when opening a CKFinder POPUP . See the code below:

// config.js
var finder  = new CKFinder();
finder.popup();

// CONFIG.PHP
$baseDir = __DIR__.'/../../biblioteca/';
$baseUrl = '';

I want it to go into a specific folder when you click a button, the folder that is in the button ID. But I could not do it. I think this setting is interfering with Config.PHP of CKFinder. However, if I move in this file, it does not work either.

    
asked by anonymous 15.04.2015 / 15:37

1 answer

3

The popup () method accepts as the first parameter the basePath. It has the following signature:

<static> {CKFinderAPI} CKFinder.popup(basePath, width, height, selectActionFunction, callback)

So, in the click events of the buttons, you should call the popup as follows:

finder.popup( $(this).attr('id') );
    
15.04.2015 / 17:00