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
)
Sub AddContentItems (
contentItems As IEnumerable(Of IContentItem)
)
void AddContentItems(
IEnumerable<IContentItem^>^ contentItems
)
abstract AddContentItems :
contentItems : IEnumerable<IContentItem> -> unit
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:
int outVar;
var pagesToAdd = session.Site.AssetFolder("af/5").DescendantAssets(out outVar);
if(pagesToAdd.Any()){
category.AddContentItems(pagesToAdd);
}
See Also