Creates a gallery view of images of type or subtype of BaseImage
that were returned from the results. If a user selects an image, the image opens in lightbox mode.
For each image
that is used in this component, if any of the following fields are filled in, they are passed and rendered over the image, though none are required:
Parameter | Type | Description |
---|---|---|
title | Text | Primary text displayed |
subTitle | Text | Secondary text displayed |
caption | Text | Body text displayed |
For more information on images, see the viv.core
library capsule documentation.
result-view {
match: Hotel (hotel) {
from-output: ShowHotelImageListOf
}
message {
template ("Here is a hotel using image-list-of:")
}
render {
if (size(hotel) == 1) {
image-list-of (hotel.images) {
size (Medium)
title ("Hotel")
}
}
}
}
You can run the sample capsule in the Simulator to see how this component displays on different devices, if supported.
The following action model returns a number of images:
// FindImages.model.bxb
action (FindImages) {
type (Search)
output (Image)
}
You would return the results using the following results-view
file:
// FindImages.view.bxb
result-view {
match: Image (this)
message { template ("Here are some cool images...") }
render {
image-list-of (this) {
size (Small)
title { template ("test images...") }
}
}
}