Item.GetChildren () allows you to change the parameters. This flexibility is why .GetChildren () is preferred. Children to retrieve a collection of ChildList children.
For example, to ignore any protection applied to these elements, use: item.GetChildren (Sitecore.Collections.ChildListOptions.IgnoreSecurity)
Above is the code of these three methods / property
public ChildList GetChildren()
{
return this.GetChildren(ChildListOptions.None);
}
public ChildList GetChildren(ChildListOptions options)
{
return Sitecore.Diagnostics.Assert.ResultNotNull<ChildList>(ItemManager.GetChildren(this, (options & ChildListOptions.IgnoreSecurity) != ChildListOptions.None ? SecurityCheck.Disable : SecurityCheck.Enable, options));
}
public ChildList Children
{
get
{
return new ChildList(this);
}
}
source
share