I understand that .GetItems()
will return a list of items within a structure group, but exactly what items can I expect to see in that list? Will it just be pages and structure groups, or should I expect other types of items as well?
GetItems()
returns an IEnumerable<RepositoryLocalObject>
which can potentially contain Pages
and Structure Groups
.
Adding the optional Filter
parameter will limit the types of items returned.
Item Types can be filtered based on the below rules:
If the container is a Publication:
- ItemType.Folder (returns the root Folder)
- ItemType.StructureGroup (returns the root Structure Group, if present)
- ItemType.Category (returns all top-level Categories, if any exist)
If the container is a Folder:
- ItemType.Folder
- ItemType.Schema
- ItemType.Component
- ItemType.ComponentTemplate
- ItemType.PageTemplate
- ItemType.TargetGroup
- ItemType.TemplateBuildingBlock
- ItemType.VirtualFolder
If the container is a Virtual Folder:
- ItemType.Folder
- ItemType.Schema
- ItemType.Component
- ItemType.ComponentTemplate
- ItemType.PageTemplate
- ItemType.TargetGroup
- ItemType.TemplateBuildingBlock
- ItemType.VirtualFolder
- ItemType.StructureGroup
- ItemType.Page
If the container is a Structure Group:
- ItemType.StructureGroup
- ItemType.Page
If the container is a Category:
- ItemType.Category
- ItemType.Keyword
-
4Virtual Folder can also contain Pages and Structure Groups, since it is a search result. – Bart Koopman Jan 29 '14 at 17:35
You will received just the items that can be created inside a Structure Group, Pages
and Structure Groups