IsFolderAncestorOf (open)

Check if a folder is a parent or ancestor of another folder


LOADLIB "mod::publisher/lib/publisher.whlib";

BOOLEAN FUNCTION IsFolderAncestorOf(INTEGER parentid, INTEGER childid)


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


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


// Checks if folder with ID=2 is an ancestor of folder with ID=89
BOOLEAN example1 := IsFolderAncestorOf(2,89);