ICategoryNodeAddContentItems Method
|
Associates a collection of new
IContentItem with this CategoryNode.
Namespace: Ingeniux.CMSAssembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntaxvoid AddContentItems(
IEnumerable<IContentItem> contentItems
)
Sub AddContentItems (
contentItems As IEnumerable(Of IContentItem)
)
void AddContentItems(
IEnumerable<IContentItem^>^ contentItems
)
abstract AddContentItems :
contentItems : IEnumerable<IContentItem> -> unit Parameters
- contentItems IEnumerableIContentItem
- Content items to associate with this CategoryNode.
Example
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