Global Objects
Global objects are available in every Liquid template file within your theme. They provide access to site-wide data, navigation, settings, and collections.
Site & Request Objects
Section titled “Site & Request Objects”site object
Section titled “site ”Contains information about the current site.
| Property | Type | Description |
|---|---|---|
url | string | The absolute base URL of the site (e.g., https://example.com) |
<a href="{{ site.url }}">Home</a><link rel="canonical" href="{{ site.url }}{{ request.path }}" />request object
Section titled “request ”Contains information about the current HTTP request.
| Property | Type | Description |
|---|---|---|
url | string | The full URL of the current request |
path | string | The path portion of the URL (e.g., /events/hamlet) |
method | string | The HTTP method (e.g., GET, POST) |
{% if request.path == '/' %} <body class="is-homepage">{% endif %}
<meta property="og:url" content="{{ request.url }}" />tenant object
Section titled “tenant ”Contains information about the current tenant (organization).
| Property | Type | Description |
|---|---|---|
id | string | The unique identifier for the tenant |
name | string | The name of the tenant organization |
slug | string | The URL-safe identifier for the tenant |
timezone | string | The tenant’s configured timezone |
defaultLanguage | string | The default language code (e.g., en) |
dateTimeFormats | object | Date and time formatting preferences |
<html lang="{{ tenant.defaultLanguage | default: 'en' }}"><p>© {{ 'now' | date: '%Y' }} {{ tenant.name }}</p>locale string
Section titled “locale ”The current locale code for the request (e.g., en, es, fr).
{% if locale == 'es' %} <p>Bienvenidos</p>{% else %} <p>Welcome</p>{% endif %}is_preview boolean
Section titled “is_preview ”Returns true when viewing the site in preview mode from the CMS, false otherwise.
{% if is_preview %} <div class="preview-banner"> You are viewing a preview. Changes may not be published yet. </div>{% endif %}body_classes string
Section titled “body_classes ”Returns a space-separated string of CSS classes based on the current template. Useful for template-specific styling.
<body class="{{ body_classes }}">For a page template, this might output: page
For an event template with a custom template variation, this might output: page page-concert
Theme Configuration Objects
Section titled “Theme Configuration Objects”settings object
Section titled “settings ”Contains all theme settings defined in your config/settings_schema.json file. Settings are organized by group name.
{# Access a setting from a group #}{{ settings.header.logo }}
{# Use settings in conditional logic #}{% if settings.global.show_announcement_bar %} <div class="announcement">{{ settings.global.announcement_text }}</div>{% endif %}
{# Access social links #}{% for link in settings.social.links %} <a href="{{ link.url }}">{{ link.platform }}</a>{% endfor %}apps object
Section titled “apps ”Contains configuration for installed third-party integrations. Only settings marked with showInFrontstage: true are exposed.
| Property | Type | Description |
|---|---|---|
tessitura | object | Tessitura ticketing integration settings |
google | object | Google services integration settings (Analytics, Maps, etc.) |
spektrix | object | Spektrix ticketing integration settings |
tixly | object | Tixly ticketing integration settings |
elevent | object | Elevent integration settings |
lineup | object | Lineup integration settings |
{% if apps.google.analytics_id %} <script async src="https://www.googletagmanager.com/gtag/js?id={{ apps.google.analytics_id }}"></script>{% endif %}
{% if apps.tessitura %} {# Tessitura-specific ticketing code #}{% endif %}content_for_header string
Section titled “content_for_header ”Returns required header content that must be included in your layout’s <head> section. This may include analytics scripts, meta tags, or other essential code.
<head> <meta charset="utf-8"> <title>{{ page.title }}</title> {{ content_for_header }}</head>forms_endpoint string
Section titled “forms_endpoint ”Returns the base URL for the Basker forms API. Used internally by the {% form %} tag.
{# Typically used internally, but available if needed #}<form action="{{ forms_endpoint }}/submit/{{ form.id }}"> ...</form>Navigation Object
Section titled “Navigation Object”navigation object
Section titled “navigation ”The navigation object provides access to the site’s page hierarchy. It contains methods to access menus and traverse the page tree.
| Property/Method | Type | Description |
|---|---|---|
menus | object | Access named navigation menus |
root_pages | array | Top-level pages in the navigation |
Accessing Menus
Section titled “Accessing Menus”{% assign main_nav = navigation.menus['main-menu'] %}{% for item in main_nav %} <a href="{{ item.relativePath }}">{{ item.title }}</a> {% if item.children.size > 0 %} <ul> {% for child in item.children %} <li><a href="{{ child.relativePath }}">{{ child.title }}</a></li> {% endfor %} </ul> {% endif %}{% endfor %}Navigation Item Properties
Section titled “Navigation Item Properties”Each navigation item (page) has the following properties:
| Property | Type | Description |
|---|---|---|
id | string | The unique page identifier |
title | string | The page title |
slug | string | The URL-safe identifier |
relativePath | string | The full path to the page (e.g., /about/team) |
order | number | The sort order among siblings |
parent | object | The parent page, or null for root pages |
children | array | Child pages |
showInNavigation | boolean | Whether the page appears in navigation |
Collection Objects
Section titled “Collection Objects”These global objects provide access to all content of a specific type. They are lazy-loaded, meaning data is only fetched when accessed.
all_events array
Section titled “all_events ”Returns all published events for the current tenant.
{% for event in all_events %} <article> <h2>{{ event.title }}</h2> <p>{{ event.startDate | date: '%B %d, %Y' }}</p> </article>{% endfor %}upcoming_events array
Section titled “upcoming_events ”Returns events with a start date in the future, sorted by start date ascending.
<h2>Upcoming Events</h2>{% for event in upcoming_events limit: 5 %} <a href="/events/{{ event.slug }}"> {{ event.title }} - {{ event.startDate | date: '%b %d' }} </a>{% endfor %}event_instances array
Section titled “event_instances ”Returns all event instances (individual performances/showings) for the current tenant.
{% for instance in event_instances %} <div class="performance"> {{ instance.startDate | date: '%B %d at %I:%M %p' }} {% if instance.venue %} at {{ instance.venue.name }} {% endif %} </div>{% endfor %}all_pages array
Section titled “all_pages ”Returns all published pages for the current tenant.
{% for page in all_pages %} <a href="{{ page.relativePath }}">{{ page.title }}</a>{% endfor %}all_posts array
Section titled “all_posts ”Returns all published blog posts for the current tenant.
{% for post in all_posts limit: 10 %} <article> <h3><a href="/blog/{{ post.slug }}">{{ post.title }}</a></h3> <time>{{ post.publishDate | date: '%B %d, %Y' }}</time> <p>{{ post.lede }}</p> </article>{% endfor %}all_blogs array
Section titled “all_blogs ”Returns all blogs (blog collections/channels) for the current tenant.
{% for blog in all_blogs %} <a href="/blog/{{ blog.slug }}">{{ blog.title }}</a>{% endfor %}all_series array
Section titled “all_series ”Returns all event series for the current tenant.
{% for series in all_series %} <div class="series-card"> <h3>{{ series.title }}</h3> <p>{{ series.description }}</p> </div>{% endfor %}all_seasons array
Section titled “all_seasons ”Returns all seasons for the current tenant.
{% for season in all_seasons %} <option value="{{ season.id }}">{{ season.title }}</option>{% endfor %}all_venues array
Section titled “all_venues ”Returns all venues for the current tenant.
{% for venue in all_venues %} <div class="venue"> <h3>{{ venue.name }}</h3> <address> {{ venue.addressLine1 }}<br> {{ venue.city }}, {{ venue.state }} {{ venue.postalCode }} </address> </div>{% endfor %}all_people array
Section titled “all_people ”Returns all people (artists, performers, staff, etc.) for the current tenant.
{% for person in all_people %} <div class="person-card"> {% if person.image %} <img src="{{ person.image | image_url: width: 200 }}" alt="{{ person.name }}"> {% endif %} <h3>{{ person.name }}</h3> </div>{% endfor %}all_organizations array
Section titled “all_organizations ”Returns all organizations for the current tenant.
{% for org in all_organizations %} <a href="/organizations/{{ org.slug }}">{{ org.name }}</a>{% endfor %}all_works array
Section titled “all_works ”Returns all creative works for the current tenant.
{% for work in all_works %} <div class="work"> <h3>{{ work.title }}</h3> {% if work.author %} <p>by {{ work.author }}</p> {% endif %} </div>{% endfor %}all_categories array
Section titled “all_categories ”Returns all post categories for the current tenant.
<nav class="categories"> {% for category in all_categories %} <a href="/blog/category/{{ category.slug }}">{{ category.title }}</a> {% endfor %}</nav>all_tags array
Section titled “all_tags ”Returns all tags for the current tenant.
<div class="tag-cloud"> {% for tag in all_tags %} <a href="/blog/tag/{{ tag.slug }}" class="tag">{{ tag.title }}</a> {% endfor %}</div>all_forms object
Section titled “all_forms ”Returns all forms indexed by both ID and slug. Use with the {% form %} tag or for custom form rendering.
{# Access form by slug #}{% assign contact_form = all_forms['contact'] %}
{# Check if a form exists #}{% if all_forms['newsletter'] %} {# Render newsletter signup #}{% endif %}Custom Attributes
Section titled “Custom Attributes”attribute_definition object
Section titled “attribute_definition ”Returns the custom attribute definitions organized by namespace and attribute name. Useful for building dynamic UIs based on custom attribute configurations.
{# Access attribute definitions for events #}{% assign event_attrs = attribute_definition['events'] %}
{% for attr in event_attrs %} {# attr contains the attribute configuration #}{% endfor %}