Click or drag to resize

ICategoryNodeAddContentItems Method


Associates a collection of new IContentItem with this CategoryNode.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.3.169
Syntax
void AddContentItems(
	IEnumerable<IContentItem> contentItems
)

Parameters

contentItems
Type: System.Collections.GenericIEnumerableIContentItem
Content items to associate with this CategoryNode.
Examples
Example associating assets to a new category in OnCategoryCreated custom hook:
C#
int outVar;
var pagesToAdd = session.Site.AssetFolder("af/5").DescendantAssets(out outVar);
if(pagesToAdd.Any()){
    category.AddContentItems(pagesToAdd);
}
See Also