Class CmsAddCategoriesPostCreateHandler

java.lang.Object
org.opencms.file.collectors.CmsAddCategoriesPostCreateHandler
All Implemented Interfaces:
I_CmsCollectorPostCreateHandler

A post create handler that adds categories to newly created resources (that are not a copy of an existing resource).

To configure it for adding the categories with category paths "cat1/subcat1/", "cat1/subcat2/" and "cat2/" add the attribute postCreateHandler="org.opencms.file.collectors.CmsAddCategoriesPostCreateHandler|cat1/subcat1/,cat1/subcat2/,cat2/" to the tag that provides the create option (i.e., <cms:contentload>, <cms:edit> or <cms:display>.

Instead of providing category paths, one can also use site or root paths of the folders representing the categories. If a category path starts with "/" it is assumed to be site or root path. Otherwise it is treated as category path, i.e., the path without the category repositories base path.

See Also: