A system, method, and computer program product are provided for
automatically linking items with multiple attributes to multiple levels
of folders within a content management system. The present system extends
automatic linking to support multiple levels of folders and multiple
attributes. One feature of the present system is to supplement the
implementation of the automatic linking plan without user involvement so
that the user is not required to know the rules for creating or nesting
folders. A system defined attribute is used to indicate that the folder
item was created by the present system. In addition, the present system
automatically moves an item from one folder to another when the item is
changed to a different type if the item was first added to the folder by
the present system. When an item's attributes are changed or the item is
redefined as a different type, the item is re-indexed. The present system
then changes the item's link from the original folder to a new or
different folder that matches the item's new attributes or definition. If
no correspondence folder exists for this customer, the present system
creates a new folder with the proper attributes. If the result of
removing an item from a folder results in an empty folder and if the
folder was originally created by automatic linking, the present system
deletes the empty folder. When the present system creates a new folder,
the "automatic linking" rules for that item type are checked by the
present system. This process is executed recursively.