10-10-2008 01:41 AM
'File Picker' Folder Restriction
The 'folder_restriction' parameter must be set to a relative AVM folder path (e.g. some/relative/folder/path). This must point to the AVM folder to which you want to restrict the file picker and be relative to the ROOT folder of the web project. Only the contents of the specified folder will be available for selecting in the file picker. If the 'folder restriction' parameter is set to the example relative folder path above, then the absolute path for that AVM folder will be something like 'sandbox-store-id:/www/avm_webapps/ROOT/some/relative/folder/path' - where 'sandbox-store-id' is the ID of the sandbox being populated by the file picker and '/www/avm_webapps/ROOT/' is the path to the ROOT folder of the web project.
10-15-2008 10:47 AM
<param name="selectable_types">wcm:avmcontent,wcm:avmfolder</param>
the wcm:avmfolder should allow you to see and select subfolders.
10-15-2008 12:17 PM
// if folder path restriction (relative path) is set,
// then calculate the absolute restriction path (in context of file
// picker's
// initial current path - the path at which it was opened the first time)
// and set file picker current path to that
if ((folderPathRestriction != null)
&& (folderPathRestriction.length() != 0))
{
if (!currentPath.startsWith(initialCurrentPath + folderPathRestriction))
{
currentPath = initialCurrentPath + folderPathRestriction;
}
}
The if (!currentPath.startsWith(initialCurrentPath + folderPathRestriction)) modifcation checks to see if we are in a subdirectory of the original path restriction. I guess you could go further and create another parameter to decide whether to operate like this or with a total restriction as before.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.