Blog

 Last Edited: Jul 02, 2019

Dependencies

Authors Module - optional

Syntax

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

Parameters

  • id - the Module's ID

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

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

  • layout - default is /default/ - 'layout' values are relative to the folder: layouts/modules/Blog (module_3)/[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 Module item (alphabetical)

    • created_at - date the Module item was created

    • updated_at - date the Module item was last edited

    • properties.weighting - weighting of the Module 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']}}

Liquid Tags

Field Name
Liquid Tag
Description

Item Name

{{ this['name'] }}

name of the Blog

Item Slug

{{ this['slug'] }}

item url

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

Title

{{ this['title'] }}

title of the blog

Subtitle

{{ this['subtitle'] }}

subtitle of the blog

Description

{{ this['description'] }}

list description of the blog

Author

{% include 'webapp', id: '1234', item_ids: item['author'], datasource: 'true' -%}

data source of author. id - the ID of the WebApp or Module. required item_ids - the liked item's ID. required datasource - this is a required as 'true'. layout - optional

Main Image

{{ this['main_image'] }}

main image of the blog

Main Image Alt

{{ this['main_image_alt'] }}

main image alt tag of the blog

List Image

{{ this['list_image'] }}

list image of the blog

List Image Alt

{{ this['list_image_alt'] }}

list image alt tag of the blog

Content

{{ this['content'] }}

main content of the blog


Layout Files

Blog Module layouts are stored in the following folder structure, which you can view via Code Editor: layouts/modules/Blog (module_3)/

Within this module folder you will find the following layout folders:

  • default/ - the default layout folder

    • detail/ - full page layouts folder (default not in use)

      • item.liquid - detail item content file

      • wrapper.liquid - detail item wrapper file

    • list/ - page section layouts folder

      • item.liquid - list item content file

      • wrapper.liquid - list item wrapper file

  • design_system/ - design system layouts folder

    • 1.liquid - DS layout 1

    • 2.liquid - DS layout 2