Copies a Category Node and its descendants, and places the copy as child or sibling of another Category Node.
Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 9.0.565.0 (9.0.565)
Syntax
ICategoryNode CopyCategory( ICategoryNode sourceCategory, ICategoryNode targetCategory, bool asSibling, bool recursive )
Parameters
- sourceCategory
- Type: Ingeniux.CMSICategoryNode
The category node to copy. Cannot be null. - targetCategory
- Type: Ingeniux.CMSICategoryNode
The category node under which to place the copy. If null, the copy will be placed as a new root category. - asSibling
- Type: SystemBoolean
Specifies whether the copy is placed as a child or as a sibling of the target node. If the target node is null, this parameter has no effect. - recursive
- Type: SystemBoolean
Specifies whether the copy includes all the category node's descendants.
Return Value
Type: ICategoryNodeThe copy that was placed at the correct location
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | When the operating user doesn't have permissions to Manage Taxonomy System; doesn't have read-only access to the source node; or doesn't have full access to the target node. |
Remarks
The copy returned is not yet stored in the database.
The operating user must have the rights to Manage Taxonomy System. This user must also have at least read-only permissions on the source category and full access to the target cateogry. (If the target category is null, the user's permissions don't matter.)
There is no concept of orders in the taxonomy tree.
See Also