IAssetItemAncestorFoldersCount Method
|
Gets the count of ancestor asset folders of the context asset item.
Namespace: Ingeniux.CMSAssembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntaxint AncestorFoldersCount()
Function AncestorFoldersCount As Integer
int AncestorFoldersCount()
abstract AncestorFoldersCount : unit -> int
Return Value
Int32Count of ancestor asset folders.
RemarksIf the asset item is the Assets Tree root, returns empty collection.
Example
Example of checking the folder depth in OnNew custom hook:
if(contentItem.AncestorFoldersCount() > 5){
}
See Also