Every view/template receives prepared data, either entered by the user on this page, or provided through a query. It can contain many items - so to get the list, use AsList(Data)
.
If a view has many items assigned (called a list) these should be retrieved from Data
- if you don't specify a stream, it's treated as Data["Default"]
. You will usually want to convert it to a dynamic list using AsList(...)
. This example also uses Text.Has(...)
to only show a picture if it really has a mugshot.
-
-