Home Theme-templates Galleries-index
galleries/index.liquid
The galleries/index.liquid
template is used to render the images
of current listing.
Template Considerations
Filtering by albums
You can use albums to filter a collection into smaller subsets of galleries. For example, if you are in a collection and want to only show images with the album “Ground Floor”, you can do so by appending the album’s handle to the end of the galleries’s URL.
http://my-shop.yoolk.com/galleries/<album-id>-ground-floor
For more details and examples, see (tutorial).
Paginating
Yoolk limits the number of images that can be output per page to 25. For this reason, collections with more than 25 images, must use the paginate tag to split the collection into multiple pages.
{% paginate listing.images by 25 %}
{% for image in paginate.collection %}
<!--show image details here -->
{% endfor %}
{% endpaginate %}
Requirements for the Theme
If you’re looking to submit your theme to the Yoolk Theme, the galleries/index.liquid template of your theme must meet the following conditions:
-
Images are listed in a grid, with the following attributes of the images variable output:
{{ image | attachment_url: 'medium' | image_tag }}
image.caption
(not break the layout when caption is long)- Different image ratios should not break the layout
- Enlargeable via Lightbox or zooming with large style
- Links for filtering a collection by albums (tutorial)
- Output image.alt for all images
- Use proper pagination