Click or drag to resize

IAssetFolderDescendantAssetsWithMaxDepth Method


Retrieves the descendant assets of the context asset folder within the given depth limit.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntax
IEnumerable<IAsset> DescendantAssetsWithMaxDepth(
	out int count,
	int maxDepth,
	int pageSize = -1,
	int startIndex = -1
)

Parameters

count  Int32
Total count of all descendant assets.
maxDepth  Int32
The depth limit of descendants, relative of this asset folder's hierarchy level.
Example
A maxDepth value of 2 means to retrieve the descendants that are within 2 levels below the given asset folder.
Remarks
A maxDepth of 0 means to retrieve all descendants.
pageSize  Int32  (Optional)
Number of entries to return. If not provided, returns all entries.
startIndex  Int32  (Optional)
Starting index of entries. If not provided, starts from the first entry.

Return Value

IEnumerableIAsset
Collection of descendant assets within the depth limit.
Example
Example of DescendantAssetsWithMaxDepth method in custom hook:
C#
int outVar;
foreach(IAsset asset in session.Site.AssetFolder("af/5").DescendantAssetsWithMaxDepth(out outVar, 2)){
    //Additional Actions
}
See Also