âšī¸Layouts
Outputting List Views on the Front-End
Like with other Modules, you will use a Liquid Tag to output a list of Module Items on a Page, Page Template, Email or Partial Liquid File of your choice.
You can use the following parameters:
ID
- This must be set to17
as this refers to the ID of the Media Downloads Modulelayout
- The Layout Folder containing the List Layoutper_page
- How many Items should be outputted on each Page. If more Items are available than this, Pagination controls will display.show_pagination
- if set to'true'
, pagination controls will display in the default position when more than one Page of results is available.sort_type
- The field you'd like to sort by e.g. "properties.name", or "created_at"sort_order
- Chooseasc
for ascending values ordesc
for descendingcategory_ids
- Pass in a string of comma-separated IDs of Categories to filter the List so only Items assigned to those Categories can be displayed.item_ids
- Control exactly which Items can be displayed by passing in a string of comma-separated IDs. You can find the Items' IDs in the Admin.expiry
- The number of seconds that the link is valid for after the page has finished loading. Default is 600 (10 minutes). Note this is different fromexpiry_date
, see Available Fields.
Media Downloads Layouts
There will be a default layout once you install the module but you can create your own.
Creating a Layout File
Layouts can be created at the following path: layouts/modules/module_17/my_layout_name/
Developing a List Layout
You'll need to create a list
folder in your layout folder and fill it with the following files:
wrapper.liquid
item.liquid
Your wrapper.liquid
file should contain the following Liquid which determines where the list of Items will go:
Last updated