IAssetItemIsDescendantOf Method
|
Checks whether the specified
Asset Folder is an ancestor of the context asset item.
Namespace: Ingeniux.CMSAssembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntaxbool IsDescendantOf(
IAssetFolder ancestorFolder
)
Function IsDescendantOf (
ancestorFolder As IAssetFolder
) As Boolean
bool IsDescendantOf(
IAssetFolder^ ancestorFolder
)
abstract IsDescendantOf :
ancestorFolder : IAssetFolder -> bool Parameters
- ancestorFolder IAssetFolder
- The given potential ancestor folder to check against.
Return Value
BooleanCount of ancestor folders.
Example
Example of checking if an asset is a descendant of a specific folder in a custom hook:
var viewsFolder = session.Site.AssetFolder("af/113");
if(viewsFolder != null && contentItem.IsDescendantOf(viewsFolder){
}
See Also