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.308
Syntax int AncestorFoldersCount()
Function AncestorFoldersCount As Integer
int AncestorFoldersCount()
abstract AncestorFoldersCount : unit -> int
Return Value
Type:
Int32Count of ancestor asset folders.
Remarks If the asset item is the Assets Tree root, returns empty collection.
Examples
Example of checking the folder depth in OnNew custom hook:
if(contentItem.AncestorFoldersCount() > 5){
}
See Also