File Manager launchDialog filtering
Permalink
Hello,
I was wonder how to use the filtering options in the launchDialog method. In search.js the following comment can be found.
But passing this as an options doesn't give any results. I was hoping to be enable to filter the results of the files shown based on the value of a custom file attribute.
Thx
I was wonder how to use the filtering options in the launchDialog method. In search.js the following comment can be found.
// filters must be an array of objects ex: [{ field: Concrete.const.Controller.Search.Files.FILTER_BY_TYPE, type: Concrete.const.Core.File.Type.Type.T_IMAGE }]
But passing this as an options doesn't give any results. I was hoping to be enable to filter the results of the files shown based on the value of a custom file attribute.
var options = { filters : [{ field : 'attributeName', value : 'some value' }] } ConcreteFileManager.launchDialog(function(data) { ConcreteFileManager.getFileDetails(data.fID, function(r) { jQuery.fn.dialog.hideLoader(); var file = r.files[0]; oldLauncher.html(file.resultsThumbnailImg); oldLauncher.next('.image-fID').val(file.fID); }, options); });
Thx
The php code related to this can be found here:
concrete/concrete/controllers/search/files.php