IAssetItemIsDescendantOf Method
|
Checks whether the specified
Asset Folder is an ancestor of the context asset item.
Namespace:
Ingeniux.CMS
Assembly:
Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax bool IsDescendantOf(
IAssetFolder ancestorFolder
)
Function IsDescendantOf (
ancestorFolder As IAssetFolder
) As Boolean
bool IsDescendantOf(
IAssetFolder^ ancestorFolder
)
abstract IsDescendantOf :
ancestorFolder : IAssetFolder -> bool
Parameters
- ancestorFolder
- Type: Ingeniux.CMSIAssetFolder
The given potential ancestor folder to check against.
Return Value
Type:
BooleanCount of ancestor folders.
Examples
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