How can we restrict the root path for the assetpicker (coral ui) to pick assets from a designated root path (some folder under dam) only.
Please also suggest me good sources to read concepts on coral ui.
Solved! Go to Solution.
Views
Replies
Total Likes
I managed to get it working with the following code.
Granite.author.ui.assetFinder.registry.Images.searchRoot = data.restrict;
Granite.author.ui.assetFinder.registry.Images.setSearchPath(data.restrict);
$('foundation-autocomplete.coral-Form-field.assetfilter.path').val(data.restrict);
Granite.author.ui.assetFinder.utilsCommons.loadAssets(false);
Views
Replies
Total Likes
Which AEM version are you using? Also are you taking about http://localhost:4502/aem/assetpicker.html ?
Views
Replies
Total Likes
I am using AEM 6.3, yes correct it is the same component that i have implemented using coral ui in render.jsp.
Views
Replies
Total Likes
Is there any answer to this ?
In 6.2 I had a clientlib that did
Granite.author.ui.assetFinder.registry.Images.searchRoot = data.restrict;
Granite.author.ui.assetFinder.registry.Images.setSearchPath(data.restrict);
$('.coral-InputGroup-input.coral-Textfield.js-coral-pathbrowser-input[name=assetfilter_image_path]').val(data.restrict);
Granite.author.ui.assetFinder.utilsCommons.loadAssets(false);
where data.restrict is the path i want to set the filter to
This doesn't work in 6.3, even though i can see the page code is calling the loadAssets(false) it isn't updating the images
Views
Replies
Total Likes
I managed to get it working with the following code.
Granite.author.ui.assetFinder.registry.Images.searchRoot = data.restrict;
Granite.author.ui.assetFinder.registry.Images.setSearchPath(data.restrict);
$('foundation-autocomplete.coral-Form-field.assetfilter.path').val(data.restrict);
Granite.author.ui.assetFinder.utilsCommons.loadAssets(false);
Views
Replies
Total Likes
Thxs for posting this!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies