Tailor Starter Documentation
Get ThemeOctober CMS DocsGitHub
  • Getting Started
  • Pages
    • Blocks
      • Hero Section
      • Section
        • Advanced Tab
        • Content Column
        • Buttons Column
        • Image Column
        • Posts Column
        • Events Column
        • Products Column
        • FAQs Column
        • Form Column
        • Search Column
      • Posts Section
      • Events Section
      • Products Section
      • Form Section
      • FAQs Section
      • Search Section
      • Creating Blocks
      • Editing Blocks
  • Menus
    • Main Menu
    • Secondary Menu
    • Social Menu
  • Blog
    • Posts
    • Authors
    • Categories
  • Events
  • Shop
    • Products
    • Product Categories
    • Product Properties
    • Orders
    • Cart
  • FAQs
  • Forms
    • Submissions
  • Search
  • Icons
  • Settings
  • Editing Blueprint Files
  • Seed Data
Powered by GitBook
On this page
Edit on GitHub
  1. Pages
  2. Blocks

Events Section

PreviousPosts SectionNextProducts Section

Last updated 2 years ago

This block shows Events from the entry type. The section's display behavior is controlled by the following settings:

  • settings.enable_events: Defined in the

  • section.reverse_order: A boolean value indicating whether the events should be displayed in reverse order.

  • section.show_specific_items: A boolean value indicating whether specific events should be displayed.

  • section.specific_items: An array of specific events to display, if section.show_specific_items is true.

  • section.sort_by: A string value indicating how to sort the events. Possible values are 'title' or 'date'.

  • section.enable_pagination: A boolean value indicating whether to display the events with pagination.

  • section.limit: An integer value indicating the number of events to display per page, if section.enable_pagination is true.

The section's tag name is either section or the section.html_tag in the fields if you have it set. The Advanced Tab fields also add an ID attribute and CSS Classes that you specify. You can also adjust the Bootstrap container type as well in this tab.

You can also adjust the spacing before and after using the switches from section.disable_top_spacing, and section.disable_bottom_spacing respectfully.

The code sets several time-related variables, such as the current date/time, various formats for displaying the date and time of events based on the section's settings, such as hiding the event date or hiding the event time based on the settings

If the section is set to show "upcoming" events, the code filters the events array to only include events with a date that is greater than or equal to the current date.

The code then sorts the events and older_events arrays based on either the event title or date, as specified in the section's settings.

Files Used

The following files are used to display this content

  • used in the file

  • partial file

Events
Settings
Advanced Tab
Events
builder/events/*
builder.yaml
builder/sections/events.htm