This option enables you to specify a rootpath the user will not be able to go outside this rootpath. If this rootpath isn't within the rootpath returned by the Authenticator or within the rootpath it will discontinue the execution and present a error message, this is for security reasons a user would other wise be able to specify any path with a simple JavaScript call.

Example of usage in init call on page level

mcImageManager.init({
rootpath : "/somedir/somedir2"
});

Example of usage in mcImageManager.open call

<a href="javascript:mcImageManager.open('example1','url','','',{rootpath : '/somedir/somedir2'});">[Browse]</a>

Example of usage in a TinyMCE init call

tinyMCE.init({
...
imagemanager_rootpath : "/somedir/somedir2"
});
User Image
  • 2012-06-26 23:17:44

igoriol

Perfect ! that works perfectly
Thanx Leonardteo ;^]

User Image
  • 2012-03-27 19:06:30

leonardteo

Referring to this post: http://www.tinymce.com/forum/viewtopic.php?id=27480
It seems like you need to put {0} before your path or nothing shows up!
e.g.

jQuery('#select_thumbnail').click(function(){
mcImageManager.browse({
fields : 'form_thumbnail',
remove_script_host: true,
relative_urls : false,
rootpath: "/products", // DOES NOT WORK!
remember_last_path : false
});
return false;
});

jQuery('#select_thumbnail').click(function(){
mcImageManager.browse({
fields : 'form_thumbnail',
remove_script_host: true,
relative_urls : false,
rootpath: "{0}/products", //This works!
remember_last_path : false
});
return false;
});