Change log

module (Event)

This module component fetches data relating to Events.

{% component type: "module", source: "Event", layout: "List" %}

Parameters and Options

Parameter
Values
Required
Description
type
module (default)
module_of_member

This is the name of the entity that needs to be used for the component retrieving function.

module is the standard retrieving function to retrieve all items.

module_of_member retrieves only those items 'Added by' the currently logged in user (identified by the CreatedByMemberId property in the module items Liquid data).

The 'Added by' System Property will only be available where the modules settings have 'Allow Add New Items' turned on under the 'Site User Permissions'.

source
Event (default)
The module’s entity/alias name or ID that the data is to be sourced from.
layout
List (default)
<Your Layout name>

The layout name you want to use for rendering the component. The layout name is referenced from the available Layouts of the source specified.

While this parameter is required to render your Layout markup, if the parameter is blank, has an incorrectly referenced Layout, or is removed altogether then the component will still output the modules item data to a Liquid collection which can be accessed via the collectionVariable parameter.

filterBy
id
parentid
name
weighting
url
urlslug
releasedate
expirydate
LastUpdatedDate
Author
ItemCategories
ItemTags
<CustomPropertyName>
...and any other top level properties available for the module

The name of the property to filter by. If empty or not present, no filtering will be used.

Remove spaces from custom property names here.

filterValue
<your value>

Your specific value to filter by, eg: name, id, number, date, etc.
Liquid variables can be used here also. If present but no value set, no items will be returned.
sortBy
id
parentid
name
weighting
url
urlslug
releasedate
expirydate
LastUpdatedDate
Author
ItemCategories
ItemTags
<CustomPropertyName>
...and any other top level properties available for the module

The name of the property to sort by. If empty or not present, alpha/numeric sorting will be used.

Remove spaces from custom property names here.

sortOrder
ASC (default)
DESC

ASC sorts the items in ascending order while DESC sorts in descending order (based on alpha/numeric or date sorting).
If empty or not present, alpha/numeric sorting will be used.
ignoreWeighting
false (default)
true

Enables/disables sorting items first by their weighting values. When false items will sort by their weighting values first, followed by any sortBy properties (or the default alpha/numeric sorting if sortBy is empty or not present). If true item weightings will be ignored and sorting will only be applied via sortBy or default sorting.
random
false (default)
true

Displays the available items in a random order.

If used in conjunction with sortBy, that sorting criteria will be applied to the randomly retrieved results. So, if retrieving all, or most, of the items they will not appear to be random since they will then be sorted back into a logical order. To overcome this, set the sortBy parameter to 'enabled' (or another unused property) as this will not provide any viable sorting criteria* and the items will not be sorted from their initial random order.
* Unless there are weighted items, which will always override the random option.

If this param's value is 'true' - pagination will not be shown.
limit
10 (default)
<integer>

The maximum number of items returned. If displayPagination is enabled this determines the maximum number of items per page.
enablePagination
true (default)
false

Enables/disables pagination for the component.

This is useful for avoiding pagniation affects for a specific component when multiple components of the same module are output on the same page and do use pagination.

displayPagination
false (default)
true

Displays pagination if there are more items available than the limit set.
emptyMessage
<Your custom message>

Custom content that is rendered if no items are returned by the Component. The default is no content.
Liquid variables are supported here, although Liquid logic tags and HTML are not.

If using Liquid variables with filters added, be sure to change any double quotes to single quotes. For eg:
emptyMessage: “{{ myVariable | prepend: 'Error: ' }}”

To use HTML in your empty message, first capture it using a Liquid capture, then insert the capture variable into the emptyMessage parameter.

object
item (default)
collection

Determines the method for Liquid rendering.
item returns each item iteratively, one after another, for output (generally, output to a container element with no need for looping through the data).
collection returns all items as one collection for output (your container element and looping logic would be handled in the Components Layout).
collectionVariable
<yourLiquidVariableName>

Assigns the data to a Liquid collection enabling further access to the data on the Page or Template using Liquid.

Your collectionVariable value must only contain English letters, numbers or underscores. Spaces or special characters are not supported.

isSearchResult
false (default)
true

Allows search parameters in the URL to override the components output. Therefore, this parameter can be used to output module specific search results from a submitted search form.

Likewise, Tag, Category, and Archive components can be used in conjunction with this parameter for filtering the module's output.

URL search parameters will override any corresponding parameters in the component. If no search parameters are present in the URL, isSearchResult will be ignored.

Any value other than true, (including an empty value), will disable the search functionality and the component will output its regular data.

searchScope
eg:
{'prop_ParentId':'1234', 'prop_ReleaseDate_Min':'2018-07-01', 'prop_ReleaseDate_Max':'2018-07-31', 'prop_KeyWords':'Your Keywords', 'prop_ItemTags':['tag1','tag2'], 'page':'2'}

Allows a search on the module without search parameters needed in the URL. Instead, search parameters are added to the value of this parameter. Therefore, this parameter can be used to output module specific search results from hard-coded (or Liquid) values without the use of a search form.

Added search parameters will override any corresponding parameters otherwise configured on the component. If no search parameters are present, searchScope will be ignored.

This value supports Liquid and can therefore be constructed with Liquid data/variables.

<customParameter>
<your custom value>

You can add your own additional parameters (name/value pairs) to the Component tag. These will be passed to the Components Layout (and the collectionVariable if used) for use via Liquid.

Your <customParameter> name must only contain English letters, numbers or underscores. Spaces or special characters are not supported.

You can use HTML as the value here, just be sure to change any double quotes in your HTML to single quotes.

Also, see here for a tutorial on using Custom Paramters.

Liquid Output

The below example has 4 sample items (Events), but is otherwise the default structure you will get from this Component.

{
  "Params": {
    "source": "Event",
    "layout": "",
    "type": "module",
    "collectionvariable": "allEvents"
  },
  "Pagination": {
    "CurrentPage": 1,
    "ItemsPerPage": 10,
    "NumberOfPages": 1,
    "TotalItemsCount": 4
  },
  "Parent": {
    "Id": 2354,
    "Name": "module (Event)",
    "Url": "/component-types/module-event",
    "Url_List": [
      "/component-types/module-event"
    ],
    "UrlSlug": "module-event",
    "ParentId": 2127,
    "ParentId_List": [
      2127
    ],
    "ParentName": "Liquid Components",
    "ParentUrl": "/component-types",
    "TemplateName": "Docs Template",
    "Module_Alias": "DocumentationPost",
    "Module_ID": 1870,
    "Enabled": true,
    "ReleaseDate": "2018-09-03T23:00:00",
    "ExpiryDate": "2099-12-09T00:00:00",
    "SiteSearchKeywords": [],
    "Description": "<p>This module component fetches data relating to Events.</p>\r\n\r\n{% component type: \"snippet\", alias: \"code_block_processor\", data: \"{{data}}\", lang: \"liquid\" %}\r\n\r\n\r\n{% component type: \"snippet\", alias: \"section_parameters\" %}\r\n\r\n{% component type: \"json\", source_type:\"string\", source:\"{{tabularData}}\", layout:\"/snippets/tabularJSON.layout\" %}\r\n</section>\r\n\r\n{% component type: \"snippet\", alias: \"section_output\" %}\r\n\r\n{% component source: \"Event\", layout: "", type: \"module\", collectionVariable: \"allEvents\" %}\r\n<p>The below example has 4 sample <code>items</code> (Events), but is otherwise the default structure you will get from this Component.</p>\r\n{% component type: \"snippet\", alias: \"code_block_processor\", data: \"{{allEvents}}\", lang: \"json\" %}\r\n</section>\r\n\r\n{% component type: \"snippet\", alias: \"section_accessing_data\" %}\r\n\r\n<p>This data is accessible in two main ways:</p>\r\n\r\n<p>1. Using Liquid in the specified Layout via the <code>this</code> object.</p>\r\n\r\n{% component type: \"snippet\", alias: \"code_block_processor\", data: \"{{data}}\", lang: \"liquid\" %}\r\n\r\n<p>2. Directly on the Page or Template via a Liquid Collection if <code>collectionVariable</code> was added to the Component tag.</p>\r\n\r\n<p>An example using <code>collectionVariable</code> with value \"allEvents\" to list all \"Events\" across the site:</p>\r\n<p class=\"notice-note\">Here we suppress any Layout from rendering by setting <code>layout: \"\"</code> as an empty attribute.</p>\r\n\r\n{% component type: \"snippet\", alias: \"code_block_processor\", data: \"{{data}}\", lang: \"liquid\" %}\r\n\r\n<p><em>Looping through the collection to render all the item URLs in a list, giving us:</em></p>\r\n\r\n<ul>\r\n    \r\n        <li>/event/demo-event-1-no-group</li>\r\n    \r\n        <li>/event/demo-event-group-1/sample-event-one</li>\r\n    \r\n        <li>/event/demo-event-group-2/sample-event-three</li>\r\n    \r\n        <li>/event/demo-event-group-1/sample-event-two</li>\r\n    \r\n</ul>\r\n<br>\r\n<p><em>The code:</em></p>\r\n\r\n{% component type: \"snippet\", alias: \"code_block_processor\", data: \"{{data}}\", lang: \"liquid\" %}\r\n\r\n<p><em>Accessing a specific item within the collection. In this case the second item (zero based index), which in our example would render the value <code>/event/demo-event-group-1/sample-event-one</code></em></p>\r\n\r\n{% component type: \"snippet\", alias: \"code_block_processor\", data: \"{{data}}\", lang: \"liquid\" %}\r\n</section>\r\n\r\n<section id=\"secListFilteredEvents\">\r\n    <h3>List Events from a specific Event group</h3>\r\n<p>If you have more than one Event group on your site the above examples will list Events from all Event groups as one single collection. However, typically you'd want to list all Events from only the Event group they belong to (their \"parent\" Event group).</p>\r\n<p>To do this we add the <code>filterBy</code> and <code>filterValue</code> attributes to the Component tag.</p>\r\n<p>Typically, you would be listing Event group specific Events on your Event group detail page/index page. In which case you would be editing the 'General Event group Layout' to insert your Component tag, which would look like this:</p>\r\n\r\n{% component type: \"snippet\", alias: \"code_block_processor\", data: \"{{data}}\", lang: \"liquid\" %}\r\n\r\n<p>As we are within the Event group's detail Layout (which represents the 'parent' Event group) we can reference its ID for the filter value using <code>{{this['id']}}</code> and instruct the Component tag to filter the Events only by their parent (<code>filterBy: \"parentID\"</code>) - giving us only the relevant Events for the current Event group.</p>\r\n<p>You may however, want to render a list of Events on a standard page or within another modules layout,  where the Post's parent ID (the Event group it belongs to) is not readily available to us in the Liquid scope. In this case you would need to manually hardcode the desired parent Event group's ID into the component tag in place of the above Liquid generated ID (<code>filterValue: \"1234\"</code>).</p>\r\n<p class=\"notice-tip\">To obtain the Event group's ID from the admin, go to that Event group's list view (where you can see all of the Events) and note the number in the URL address bar shown after the <code>parentID=</code> parameter.</p>\r\n</section>\r\n</section>\r\n\r\n{% component type: \"snippet\", alias: \"section_event_calendar\" %}\r\n</section>\r\n\r\n{% component type: \"snippet\", alias: \"section_counter\" %}\r\n</section>\r\n",
    "Weighting": 964,
    "DisableForSiteSearch": false,
    "CreatedByMemberId": "0",
    "ItemCategories": [],
    "ItemCategoryIdList": [],
    "ItemTags": [
      "Events"
    ],
    "Author": 0,
    "Author_Name": "",
    "Author_Url": "",
    "Item_Rating": 0,
    "Active": true,
    "IgnoreUpdates": true,
    "UpdatesLog": "<ul>\n    <li>27-Oct-2020 | 5.6.0 | Added 'ignoreWeighting' parameter</li>\n    <li>'module_of_member' parameter details added.</li>\n</ul>",
    "ExternalResources": "",
    "AdditionalRelatedArticle": 0,
    "AdditionalRelatedArticle2": 0,
    "Authors": "2418",
    "ShowPageForSearchEngine": true,
    "MetaTitle": "",
    "SEOTitle": "",
    "MetaDescription": "",
    "CanonicalLink": "",
    "SocialMetaTags": "",
    "SeoPriority": 0.0,
    "EnableAMP": false,
    "AMPContent": "",
    "OpenGraphProperties": {
      "title": null,
      "type": null,
      "url": null,
      "locale": null,
      "image": null
    },
    "ExternalId": 0,
    "Params": {
      "type": "snippet",
      "alias": "section_output",
      "data": "\r\n{% component type: \"module\", source: \"Event\", layout: \"List\" %}\r\n",
      "lang": "liquid",
      "name": "SECTION Output",
      "content": "<section id=\"secOutput\">\n    <h2>Liquid Output</h2>",
      "enabled": true,
      "required": "true",
      "values": "List <em>(default)</em><br>&lt;Your Layout name&gt;",
      "altname": "category",
      "description": "Name of the category to filter Event items by. Or the hierarchical category structure if using sub categories."
    }
  },
  "Items": [
    {
      "Id": 2587,
      "Name": "DEMO Event 1 No Group",
      "Url": "/event/demo-event-1-no-group",
      "Url_List": [
        "/event/demo-event-1-no-group"
      ],
      "UrlSlug": "demo-event-1-no-group",
      "ParentId": 2330,
      "ParentId_List": [
        -1
      ],
      "ParentName": "",
      "ParentUrl": "",
      "TemplateName": "DEMO Companion Site",
      "Module_Alias": "Event",
      "Module_ID": 2330,
      "Enabled": true,
      "ReleaseDate": "2020-08-18T23:00:00",
      "ExpiryDate": "2099-12-11T13:00:00",
      "SiteSearchKeywords": [],
      "Description": "",
      "Weighting": 0,
      "DisableForSiteSearch": false,
      "SKUCode": "97d7d40c-67ec-4eac-b78d-e2aad80d2558",
      "Price": 0.0,
      "PriceHtml": "<span data-cms_product_data_price=\"2587\">0.00</span>",
      "priceWithTax": 0.0,
      "priceWithTaxHtml": "<span data-cms_product_data_price_with_tax=\"2587\">0.00</span>",
      "RecommendedPrice": 0.0,
      "RecommendedPriceHtml": "<span data-cms_product_data_recommended_price=\"2587\">0.00</span>",
      "RecommendedPriceWithTax": 0.0,
      "RecommendedPriceWithTaxHtml": "<span data-cms_product_data_recommended_price_with_tax=\"2587\">0.00</span>",
      "HideWhenFull": false,
      "AllowMultipleSubscriptionPerEmail": false,
      "Capacity": 0,
      "Allocation": 0,
      "EventDateStart": "2020-08-21T08:25:00",
      "EventDateEnd": "2022-08-21T22:59:00",
      "taxRate": 0.0,
      "VolumeDiscount": [
        {
          "Price": 0.0,
          "Quantity": 0
        }
      ],
      "CreatedByMemberId": "0",
      "ItemCategories": [],
      "ItemCategoryIdList": [],
      "ItemTags": [],
      "Author": 0,
      "Author_Name": "",
      "Author_Url": "",
      "Item_Rating": 0,
      "ShowPageForSearchEngine": false,
      "MetaTitle": "",
      "SEOTitle": "",
      "MetaDescription": "",
      "CanonicalLink": "",
      "SocialMetaTags": "",
      "SeoPriority": 0.5,
      "EnableAMP": false,
      "AMPContent": "",
      "OpenGraphProperties": {
        "title": null,
        "type": null,
        "url": null,
        "locale": null,
        "image": null
      },
      "ExternalId": 0,
      "Params": {}
    },
    {
      "Id": 2505,
      "Name": "Sample Event One",
      "Url": "/event/demo-event-group-1/sample-event-one",
      "Url_List": [
        "/event/demo-event-group-1/sample-event-one"
      ],
      "UrlSlug": "sample-event-one",
      "ParentId": 2503,
      "ParentId_List": [
        2503
      ],
      "ParentName": "DEMO Event Group 1",
      "ParentUrl": "/event/demo-event-group-1",
      "TemplateName": "",
      "Module_Alias": "Event",
      "Module_ID": 2330,
      "Enabled": true,
      "ReleaseDate": "2020-08-22T15:30:00",
      "ExpiryDate": "2099-08-23T18:30:00",
      "SiteSearchKeywords": [],
      "Description": "<p>This is the event of the year!</p>",
      "Weighting": 0,
      "DisableForSiteSearch": false,
      "SKUCode": "06871a94-e2fc-4c74-a3cf-6aabb92f9001",
      "Price": 0.0,
      "PriceHtml": "<span data-cms_product_data_price=\"2505\">0.00</span>",
      "priceWithTax": 0.0,
      "priceWithTaxHtml": "<span data-cms_product_data_price_with_tax=\"2505\">0.00</span>",
      "RecommendedPrice": 0.0,
      "RecommendedPriceHtml": "<span data-cms_product_data_recommended_price=\"2505\">0.00</span>",
      "RecommendedPriceWithTax": 0.0,
      "RecommendedPriceWithTaxHtml": "<span data-cms_product_data_recommended_price_with_tax=\"2505\">0.00</span>",
      "HideWhenFull": false,
      "AllowMultipleSubscriptionPerEmail": false,
      "Capacity": 0,
      "Allocation": 0,
      "EventDateStart": "2023-08-22T15:30:00",
      "EventDateEnd": "2023-08-23T18:30:00",
      "taxRate": 0.0,
      "VolumeDiscount": [
        {
          "Price": 0.0,
          "Quantity": 0
        }
      ],
      "CreatedByMemberId": "0",
      "ItemCategories": [],
      "ItemCategoryIdList": [],
      "ItemTags": [],
      "Author": 0,
      "Author_Name": "",
      "Author_Url": "",
      "Item_Rating": 0,
      "ShowPageForSearchEngine": false,
      "MetaTitle": "",
      "SEOTitle": "",
      "MetaDescription": "",
      "CanonicalLink": "",
      "SocialMetaTags": "",
      "SeoPriority": 0.5,
      "EnableAMP": false,
      "AMPContent": "",
      "OpenGraphProperties": {
        "title": null,
        "type": null,
        "url": null,
        "locale": null,
        "image": null
      },
      "ExternalId": 0,
      "Params": {}
    },
    {
      "Id": 2507,
      "Name": "Sample Event Three",
      "Url": "/event/demo-event-group-2/sample-event-three",
      "Url_List": [
        "/event/demo-event-group-2/sample-event-three"
      ],
      "UrlSlug": "sample-event-three",
      "ParentId": 2504,
      "ParentId_List": [
        2504
      ],
      "ParentName": "DEMO Event Group 2",
      "ParentUrl": "/event/demo-event-group-2",
      "TemplateName": "",
      "Module_Alias": "Event",
      "Module_ID": 2330,
      "Enabled": true,
      "ReleaseDate": "2020-02-12T00:00:00",
      "ExpiryDate": "2099-12-11T13:00:00",
      "SiteSearchKeywords": [],
      "Description": "",
      "Weighting": 0,
      "DisableForSiteSearch": false,
      "SKUCode": "517a6f72-a736-4d84-be7d-7833a85fb4a0",
      "Price": 0.0,
      "PriceHtml": "<span data-cms_product_data_price=\"2507\">0.00</span>",
      "priceWithTax": 0.0,
      "priceWithTaxHtml": "<span data-cms_product_data_price_with_tax=\"2507\">0.00</span>",
      "RecommendedPrice": 0.0,
      "RecommendedPriceHtml": "<span data-cms_product_data_recommended_price=\"2507\">0.00</span>",
      "RecommendedPriceWithTax": 0.0,
      "RecommendedPriceWithTaxHtml": "<span data-cms_product_data_recommended_price_with_tax=\"2507\">0.00</span>",
      "HideWhenFull": false,
      "AllowMultipleSubscriptionPerEmail": true,
      "Capacity": 50,
      "Allocation": 0,
      "EventDateStart": "2020-02-05T12:00:00",
      "EventDateEnd": "2020-02-05T18:30:00",
      "taxRate": 0.0,
      "VolumeDiscount": [
        {
          "Price": 0.0,
          "Quantity": 0
        }
      ],
      "CreatedByMemberId": "0",
      "ItemCategories": [],
      "ItemCategoryIdList": [],
      "ItemTags": [],
      "Author": 0,
      "Author_Name": "",
      "Author_Url": "",
      "Item_Rating": 0,
      "ShowPageForSearchEngine": false,
      "MetaTitle": "",
      "SEOTitle": "",
      "MetaDescription": "",
      "CanonicalLink": "",
      "SocialMetaTags": "",
      "SeoPriority": 0.5,
      "EnableAMP": false,
      "AMPContent": "",
      "OpenGraphProperties": {
        "title": null,
        "type": null,
        "url": null,
        "locale": null,
        "image": null
      },
      "ExternalId": 0,
      "Params": {}
    },
    {
      "Id": 2506,
      "Name": "Sample Event Two",
      "Url": "/event/demo-event-group-1/sample-event-two",
      "Url_List": [
        "/event/demo-event-group-1/sample-event-two"
      ],
      "UrlSlug": "sample-event-two",
      "ParentId": 2503,
      "ParentId_List": [
        2503
      ],
      "ParentName": "DEMO Event Group 1",
      "ParentUrl": "/event/demo-event-group-1",
      "TemplateName": "",
      "Module_Alias": "Event",
      "Module_ID": 2330,
      "Enabled": true,
      "ReleaseDate": "2020-02-12T00:00:00",
      "ExpiryDate": "2099-12-11T13:00:00",
      "SiteSearchKeywords": [],
      "Description": "<p>The longest event in history...</p>",
      "Weighting": 0,
      "DisableForSiteSearch": false,
      "SKUCode": "edc7c49d-1077-4f75-8ac7-23bd545d12b1",
      "Price": 0.0,
      "PriceHtml": "<span data-cms_product_data_price=\"2506\">0.00</span>",
      "priceWithTax": 0.0,
      "priceWithTaxHtml": "<span data-cms_product_data_price_with_tax=\"2506\">0.00</span>",
      "RecommendedPrice": 0.0,
      "RecommendedPriceHtml": "<span data-cms_product_data_recommended_price=\"2506\">0.00</span>",
      "RecommendedPriceWithTax": 0.0,
      "RecommendedPriceWithTaxHtml": "<span data-cms_product_data_recommended_price_with_tax=\"2506\">0.00</span>",
      "HideWhenFull": false,
      "AllowMultipleSubscriptionPerEmail": false,
      "Capacity": 100,
      "Allocation": 0,
      "EventDateStart": "2023-08-10T13:15:00",
      "EventDateEnd": "2023-08-10T17:00:00",
      "taxRate": 0.0,
      "VolumeDiscount": [
        {
          "Price": 0.0,
          "Quantity": 0
        }
      ],
      "CreatedByMemberId": "0",
      "ItemCategories": [],
      "ItemCategoryIdList": [],
      "ItemTags": [],
      "Author": 0,
      "Author_Name": "",
      "Author_Url": "",
      "Item_Rating": 0,
      "ShowPageForSearchEngine": false,
      "MetaTitle": "",
      "SEOTitle": "",
      "MetaDescription": "",
      "CanonicalLink": "",
      "SocialMetaTags": "",
      "SeoPriority": 0.5,
      "EnableAMP": false,
      "AMPContent": "",
      "OpenGraphProperties": {
        "title": null,
        "type": null,
        "url": null,
        "locale": null,
        "image": null
      },
      "ExternalId": 0,
      "Params": {}
    }
  ]
}

Accessing the Data

JSON Output

You can output the full JSON for your component data by referencing the root Liquid object {{this}} in your module’s layouts, or directly on your page, if using the collectionVariable parameter in your component tag.

For example:

{% component type: ... collectionVariable: "myData" %}

You can then render the JSON like so:

{{myData}}

For more details on using this approach, see Part 2 of the free ‘Learning Liquid Course’.

Rendering Property Values

This data is accessible in two main ways:

1. Using Liquid in the specified Layout via the this object.

{{this['url']}}

2. Directly on the Page or Template via a Liquid Collection if collectionVariable was added to the Component tag.

An example using collectionVariable with value "allEvents" to list all "Events" across the site:

Here we suppress any Layout from rendering by setting layout: "" as an empty attribute.

{% component type: "module", source: "Event", layout: "", collectionVariable: "allEvents" %}

Looping through the collection to render all the item URLs in a list, giving us:

  • /event/demo-event-1-no-group
  • /event/demo-event-group-1/sample-event-one
  • /event/demo-event-group-2/sample-event-three
  • /event/demo-event-group-1/sample-event-two

The code:

<ul>
    {% for i in allEvents.items %}
        <li>{{i['url']}}</li>
    {% endfor %}
</ul>

Accessing a specific item within the collection. In this case the second item (zero based index), which in our example would render the value /event/demo-event-group-1/sample-event-one

{{allEvents.items[1]['url']}}

List Events from a specific Event group

If you have more than one Event group on your site the above examples will list Events from all Event groups as one single collection. However, typically you'd want to list all Events from only the Event group they belong to (their "parent" Event group).

To do this we add the filterBy and filterValue attributes to the Component tag.

Typically, you would be listing Event group specific Events on your Event group detail page/index page. In which case you would be editing the 'General Event group Layout' to insert your Component tag, which would look like this:

{% component type: "module", source: "Event", layout: "List", filterBy: "parentId", filterValue: "{{this['id']}}" %}

As we are within the Event group's detail Layout (which represents the 'parent' Event group) we can reference its ID for the filter value using {{this['id']}} and instruct the Component tag to filter the Events only by their parent (filterBy: "parentID") - giving us only the relevant Events for the current Event group.

You may however, want to render a list of Events on a standard page or within another modules layout, where the Post's parent ID (the Event group it belongs to) is not readily available to us in the Liquid scope. In this case you would need to manually hardcode the desired parent Event group's ID into the component tag in place of the above Liquid generated ID (filterValue: "1234").

To obtain the Event group's ID from the admin, go to that Event group's list view (where you can see all of the Events) and note the number in the URL address bar shown after the parentID= parameter.

Event Calendar

Event items can also be listed onto a calendar layout, based on their start and end dates, using the below include.

{% include "/cms-assets/includes/event-calendar.inc", moduleId: "<Event Module ID>" %}

This include can also be generated via the Component Manager, in the Event section, along with some other attributes to further configure the output as detailed below.

Calendar Include Parameters

Parameter
Values
Required
Description
moduleId
<Event Module ID>
The ID of the Event Module (this will be automatically generated for you via the Component Manager).
group
0 (default)
-1
<Event Group ID>

The ID of the Event Module Group/parent module. Or 0 to retrieve all Event items from all groups. Or -1 to retrieve all ungrouped Event items.
category
<Category Name/Sub Category Name/>

Name of the category to filter Event items by. Or the hierarchical category structure if using sub categories.

Counter

Along with the data output above, there is also a special liquid tag available {{counter}} which increments for each item. This tag is only available within Layouts when object: "item" is used in the Component tag.



Related Articles

  • CRM
    Event Bookings

    Event Bookings store all registrations made to an Event item, either via the website front-end or manually allocated via the admin.
  • OpenAPI (Admin)
    CRM Bookings API

    Create, Retrieve, Update and Delete CRM Bookings via the public API endpoint using "where" filtering.
  • Liquid Components
    module (Event Group)

    This module component fetches data relating to Event groups. {% component type: "module", source: "Event...
  • CRM
    Advanced CRM Groups

    Advanced CRM Groups allow you to extend the data fields within multiple areas of the CRM, either globally or on a per-record basis.
  • Content Modules
    Events

    Events can be used for listing and taking paid or free bookings for date/time specific events as well as tracking capacity and multiply seat purchases.

External Resources

There are currently no external resources available.

Please let us know if you have any other contributions or know of any helpful resources you'd like to see added here.


Questions?

We are always happy to help with any questions you may have.
Visit the Treepl Forum for community support and to search previously asked questions or send us a message at support@treepl.co and we will consult you as soon as possible.