Content Lists
Any View can be configured to be a List of Content Items, and if it is a list, it can also have a Header Item.
When a View is a List...
- All Content Items in the List share the same Content-Type - like
BlogPost
- Each item in the list can have it's own Presentation Settings but these settings all share the same Content-Type - like
BlogPresentation
- Lists can have a single Header item of another Content-Type - like
BlogIntro
- If the list has a Header it can also have a Header Presentation of a type like
BlogIntroPresentation
- the first item in the List is still given to the Template as the Content variable
- Lists preserve the order of the items added to it
- The automatic toolbars change a bit when a list is being used
Use in Code
In C# you will usually do things like @foreach(var item in AsList(Data)) { ... }
or similar. Check the C# API Docs for this.
In Tokens you there is a special <repeat>
tag. Check the Tokens docs.
History
- Introduced in 2sxc v2.0
- API was improved in 2sxc 8
- The
Header
name was introduced to replace the confusingListContent
name in v10