Click or drag to resize

IAssetItemAncestorFoldersCount Method


Gets the count of ancestor asset folders of the context asset item.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntax
int AncestorFoldersCount()

Return Value

Int32
Count of ancestor asset folders.
Remarks
If the asset item is the Assets Tree root, returns empty collection.
Example
Example of checking the folder depth in OnNew custom hook:
C#
if(contentItem.AncestorFoldersCount() > 5){
    //Additional Logic
}
See Also