List Layouts

 Last Edited: Oct 25, 2019

When placed onto a page or a template, this liquid displays the WebApp items using the defined list Layout.

Syntax

{%- include 'webapp', id: '3', layout: 'default', per_page: '20', sort_type: 'properties.name', sort_order: 'asc' -%}

Parameters

  • id - the WebApp's ID

  • item_ids - output one or more WebApp items, comma seperated

  • category_ids - output all items in one or more categories, comma seperated

  • layout - default is default.liquid - 'layout' values are relative to the folder: layouts/webapps/My WebApp (webapp_1)/[layout name]

  • per_page - defines the number of items outputted on the page

  • show_pagination - default is true - defines if items should be paginated when the per_page is met.

  • sort_type - defines the type by which items are ordered

    • properties.name - name of the WebApp item (alphabetical)

    • created_at - date the WebApp item was created

    • updated_at - date the WebApp item was last edited

    • properties.weighting - weighting of the WebApp item

  • sort_order - defines the order in which the type is sorted

    • asc - sort items in ascending order

    • desc - sort items in descending order

  • collection - default is 'false' - If you set it as `collection: 'true'` then any layout is suppressed.
    Data is accessible via {{context.exports.webapp_1.data}}. For Example, name would be: {{context.exports.webapp_1.data.result.items[0]['name']}}

Default Fields

Field Name
Liquid Tag
Description

Item Name

{{ this['name'] }}

name of the FAQ

Slug

{{ this['full_slug'] }}

url of the current item, relative to the layout

Weighting

{{ this['weighting'] }}

weight of item, used for sorting

Release Date

{{ this['release_date'] }}

release date of the item

Expiry Date

{{ this['expiry_date'] }}

expiry date of the item

Enabled

{{ this['enabled'] }}

enable/disable the item

Folder Structure

When you create a WebApp, default files are automatically created for you. WebApp list layouts are stored in the following folder structure, which you can view via Code Editor: layouts/webapps/My WebApp (webapp_ID)/

Within this folder you will find the following:

  • list/ - the list layouts, used when outputting items as a section on a page

    • default.liquid - the default list layout

To create a custom layout file, right click on the list folder. Alternatively, you can edit the default file. All layout files must use the .liquid file extension, for example mylayout.liquid. Any files created within this folder will automatically become available in the dropdown selector when outputting a WebApp from the Toolbox