Click or drag to resize

IContentItemVersionAddElementsBefore Method


Adds a group of elements to Elements collection before a specified anchor element.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.5.94
Syntax
void AddElementsBefore(
	IElement anchor,
	IEnumerable<IElement> elements
)

Parameters

anchor
Type: Ingeniux.CMSIElement
The anchor element before which the group of elements is inserted
elements
Type: System.Collections.GenericIEnumerableIElement
Elements to be added to the collection
Exceptions
ExceptionCondition
ArgumentExceptionWhen any element to add has the same unique ID as an existing element.
Remarks

The elements added to the collection become direct children of the version.

The new child elements will be added the elements collection in front of the anchor element.

Any null items in the collection are ignored.

If any element to add has the same unique ID as an existing element, an error is thrown.

See Also