ItemListTrait
A list of items of any sort—for example, Top 10 Movies About Weathermen, or Top 100 Party Songs. Not to be confused with HTML lists, which are often used only for formatting.
Table of Contents
Properties
- $aggregateElement : Thing|null
- Indicates a prototype of the elements in the list that is used to hold aggregate information (ratings, offers, etc.).
- $itemListElement : null|array<string|int, mixed>|string|ListItem|Thing
- For itemListElement values, you can use simple strings (e.g. "Peter", "Paul", "Mary"), existing entities, or use ListItem.
- $itemListOrder : string|Enumeration|DefinedTerm|null
- Type of ordering (e.g. Ascending, Descending, Unordered).
- $numberOfItems : int|float|null
- The number of items in an ItemList.
Properties
$aggregateElement
Indicates a prototype of the elements in the list that is used to hold aggregate information (ratings, offers, etc.).
public
Thing|null
$aggregateElement
$itemListElement
For itemListElement values, you can use simple strings (e.g. "Peter", "Paul", "Mary"), existing entities, or use ListItem.
public
null|array<string|int, mixed>|string|ListItem|Thing
$itemListElement
Text values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists. Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases.
$itemListOrder
Type of ordering (e.g. Ascending, Descending, Unordered).
public
string|Enumeration|DefinedTerm|null
$itemListOrder
$numberOfItems
The number of items in an ItemList.
public
int|float|null
$numberOfItems
Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list.