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: Item Name
Liquid Tag: {{ this['name'] }}
Description: name of the Blog Post

Field Name: Item Slug
Liquid Tag: {{ this['slug'] }}
Description: item URL

Field Name: Weighting
Liquid Tag: {{ this['weighting'] }}
Description: weight of item, used for sorting

Field Name: Release Date
Liquid Tag: {{ this['release_date'] }}
Description: release date of the item

Field Name: Expiry Date
Liquid Tag: {{ this['expiry_date'] }}
Description: expiry date of the item

Field Name: Enabled
Liquid Tag: {{ this['enabled'] }}
Description: enable/disable the item

Field Name: Title
Liquid Tag: {{ this['Title'] }}
Description: title of the Blog Post

Field Name: Subtitle
Liquid Tag: {{ this['Subtitle'] }}
Description: subtitle of the Blog Post

Field Name: Description
Liquid Tag: {{ this['Description'] }}
Description: list description of the Blog Post

Field Name: Author - Syntax type 1 (Requires Authors Module)
Liquid Tag: {%- include 'modules/siteglide_authors/get/get_item_author', author_layout: 'design_system/1/author', author_layout_type: 'list', author_id: this['Author'] -%}
Description: data source of author. Parameters: author_layout: path to the folder containing author layouts. author_layout_type: name of author layout folder (containing wrapper and item files). author_id: Unique ID of the author for this item- can be dynamically passed in with this['Author'].

Field Name: Author - Syntax type 2 (Requires Authors Module) The benefit of this syntax is that it should be more consistent with how other Modules are outputted on the Page.
Liquid Tag: {% include 'module', id: '6', item_ids: this['Author'], layout: 'design_system/1/author', type: "list", datasource: 'true' -%}
Description: data source of author. Parameters: layout path to the folder containing author layouts within the blog module. type- name of the layout folder containing wrapper and item Liquid layout files. datasource - should be set to true to indicate that this module is a sub-module placed inside another module Layout. item_ids - indicates the unique ids of the Author items you want to display- can be dynamically passed in with this['Author'].

Field Name: Main Image
Liquid Tag: {{ this['Main_image'] }}
Description: Main image of the Blog Post

Field Name: Main Image Alt
Liquid Tag: {{ this['Main_image_alt'] }}
Description: Main image alt tag of the Blog Post

Field Name: List Image
Liquid Tag: {{ this['List_image'] }}
Description: List image of the Blog Post

Field Name: List Image Alt
Liquid Tag: {{ this['List_image_alt'] }}
Description: List image alt tag of the Blog Post

Field Name: Content
Liquid Tag: {{ this['Content'] }}
Description: Main content of the Blog Post

Field Name: Category Array
Liquid Tag: {{ this.category_array }}
Description: Outputs comma-separated list of IDs for Categories this item belongs to. 

How to output a List of Categories that your Blog Module Belongs to


You can learn more about how to use the {{this.category_array}} field to output a List of Categories that belong to the Blog Item ( or, in fact, any Module or WebApp item) here: Outputting Categories on WebApp / Module / eCommerce Layouts


Filtering the Blog List View by Category, Author or Date

You can learn more about the multiple ways of navigating and filtering the Blog List view here: Blog Navigation Introduction

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

Further folders are exist for storing Layouts for components like sidebars and filters.

Did this answer your question?