IsFolderAncestorOf (open)
Check if a folder is a parent or ancestor of another folder
Syntax
LOADLIB "mod::publisher/lib/publisher.whlib";
BOOLEAN FUNCTION IsFolderAncestorOf(INTEGER parentid, INTEGER childid)
Parameters
INTEGER parentid
ID of the folder which might contain the child folder
INTEGER childid
ID of the folder which is suspect to be a child of the parent folder.
Return value
BOOLEAN
True if the folder with ID 'parentid' is an ancestor or parent of folder with ID 'childid', or is the same folder. Both folders must be in the same site
Examples
// Checks if folder with ID=2 is an ancestor of folder with ID=89
BOOLEAN example1 := IsFolderAncestorOf(2,89);