website logo
⌘K
Introduction
PORTAL
Agency Whitelabelling
PAGES
Pages - Accessing Page Data
Pagination Layouts
Page Templates
FORMS
Form Confirmation Pages
Adding a Progress Bar
Adding Custom CSS To Show Form Submit Process
Dynamic Content in Workflow and Autoresponder Emails
How to output Custom Field Set fields in a Form's Custom Layout
Custom JavaScript Validation for Forms
File Upload Previews
FAQ
CATEGORIES
Filtering WebApps and Modules by Categories
Outputting Categories on WebApp / Module / eCommerce Layouts
Outputting Category Fields in any Location
Category Detail Layouts
FAQ
COMPANY INFORMATION
Company Information
SITE SEARCH
Site Search
PUBLIC API/ZAPIER
Zapier - Formatting arrays correctly
Public API/Zapier Changelog
MODULES
Module Marketplace
Building Custom Modules
Siteglide Modules
Front-end Submit Modules
DATA STRUCTURES
Automations
Creating WebApps from the CLI
Field Types
WEBAPPS
Front-end Submit WebApps
Layouts
Search and Filtering
Understanding Custom Field Names and IDs
FAQ
CRM
User Details
User Secure Zones
Storing User's Favourite WebApp / Module Items
User's Form Submissions (Cases)
How Users Edit their Email and Password Front End
Editing a User's CRM record Front End with Custom Field Sets
CLI
Introducing Siteglide CLI
CLI Changelog
Secure Zones with CLI
Page Templates with Siteglide CLI
Pages with Siteglide CLI
Includes with Siteglide CLI
Managing Email Templates
Migrate - Manual Form setup
Migrate - Convert existing Forms
Liquid
Accessing Assets
Liquid Dot Notation
Using WebApp Collections- Tutorial
Using the current_user object with Secure Zones
Preventing Duplicate Content with Query Parameters- Canonical URL and Robots.txt
FAQ
GraphQL
Tutorial Overview
About GraphQL
Tutorial 1- Your First Query
Tutorial 2 - Pagination
Tutorial 3 - Filtering the Results
Tutorial 3 - Answers to the First Filtering Challenge
Tutorial 4 - Advanced Filtering
Tutorial 4 - Challenge Answers
Tutorial 5 - Using Liquid to run GraphQL queries on your Site
Tutorial 6 - Variables
Tutorial 6 - Answers to the Variables Challenge
Tutorial 7 - Sorting
Tutorial 8 - Building a Liquid API GET Endpoint Page powered by GraphQL queries
Best Practice and Performance
Module/WebApp Caching
Getting Started with Liquid Caching - to Reduce Server Response time and Improve Performance
Includes
ecommerce/checkout_standard
Frequently Asked Questions
Using Liquid Logic to Check if a field exists, or is empty on the Front End
How do I learn more about Liquid?
How to setup a multi domain start page
Docs powered by archbee 
24min

Blog

Add posts in the Admin and display on the Site with List and Detail Views, search and filter List Views and combine with the Authors Module.

Dependencies

Authors Module - optional

Syntax

HTML
|

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
    • properties.release_date - date the item is set to be released
  • 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 Post

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 Post

Subtitle

{{ this['Subtitle'] }}

subtitle of the Blog Post

Description

{{ this['Description'] }}

list description of the Blog Post

Author - Syntax type 1 (Requires Authors Module)

{%- include 'modules/siteglide_authors/get/get_item_author', author_layout: 'design_system/1/author', author_layout_type: 'list', author_id: this['Author'] -%}

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'].

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

{% include 'module', id: '6', item_ids: this['Author'], layout: 'design_system/1/author', type: "list", datasource: 'true' -%}

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']

Main Image

{{ this['Main Image'] }}

main image of the Blog Post

Main Image Alt

{{ this['Main Image Alt'] }}

main image alt tag of the Blog Post

List Image

{{ this['List Image'] }}

list image of the Blog Post

List Image Alt

{{ this['List Image Alt'] }}

list image alt tag of the Blog Post

Content

{{ this['Content'] }}

main content of the Blog Post

Category Array

{{ this.category_array }}

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 exist for storing Layouts for components like sidebars and filters.

Updated 06 Sep 2021
Did this page help you?
Yes
No
UP NEXT
Blog Archive
Docs powered by archbee 
TABLE OF CONTENTS
Dependencies
Syntax
Parameters
Liquid Tags
How to output a List of Categories that your Blog Module Belongs to
Filtering the Blog List View by Category, Author or Date
Layout Files