Liquid Template Reference

All variables, tags, and filters available in Cobber's page and email template editor. Use the search above to find anything quickly.

Global Variables

Available in every page template and snippet.

organization OrganisationDrop

Organisation branding, contact info, social proof counts, and membership types.

Variable Type Description Example
organization.name String Organisation name Example Org
organization.subdomain String URL subdomain exampleorg
organization.custom_domain String Custom domain if configured example.org.au
organization.email String Organisation email address hello@example.org.au
organization.phone String Organisation phone number (07) 3000 0000
organization.address String Organisation street address 123 Main St, Sydney NSW 2000
organization.primary_color String Primary brand colour (hex) #1E3A5F
organization.secondary_color String Secondary brand colour (hex) #2D4A6F
organization.accent_color String Accent brand colour (hex) #C4956A
organization.font_family String Primary font family Instrument Sans
organization.logo_attached Boolean Whether a logo has been uploaded true
organization.logo_url String Path to the organisation logo file /rails/active_storage/blobs/...
organization.logo_link_url String URL the logo links to (defaults to "/") /
organization.copyright_name String Name used in copyright notices Example Org Inc.
organization.authorization_text String Authorised by text for political ads Authorised by J. Smith, Sydney
organization.email_from_name String Sender name used in outgoing email Example Org
organization.reply_to_email String Reply-to address for outgoing email hello@example.org.au
organization.header_theme String Header colour theme (light or dark) dark
organization.header_layout String Header layout variant centered
organization.nav_items Array Navigation items. Each item: url, label, style, button_color, children (nested array). see nav_items below
organization.member_count Integer Number of active members 423
organization.volunteer_count Integer Number of active volunteers 87
organization.supporter_count Integer Total contacts in the database (non-anonymous) 1842
organization.total_raised Float Total amount raised from all donations ($) 48320.5
organization.donor_count Integer Number of unique donors 312
organization.paid_membership_types Array All active paid membership tiers (recurring first). Each item: see MembershipType below.
organization.recurring_membership_types Array Recurring (subscription) membership tiers only.
organization.one_time_membership_types Array One-time payment membership tiers only.

MembershipType fields (each item in paid_membership_types etc.)

Variable Type Description Example
.id Integer Membership type ID 3
.name String Tier name Full Member
.price Decimal Price in dollars (raw) 50.0
.display_price String Formatted price string $50
.recurring Boolean True if this is a recurring/subscription tier true
.one_time Boolean True if this is a one-time payment false
.period_description String Billing period description per year
.couple_membership Boolean True if this tier covers two people false
.form_url String URL to the membership signup form for this tier /membership_signups/form?membership_type_id=3&landing=true

nav_items fields (each item in organization.nav_items)

Variable Type Description Example
.url String Resolved URL (page slug or custom URL) /about-us
.label String Link label text About
.style String Display style (link or button) button
.button_color String Button colour override (hex or CSS class) #C4956A
.children Array Nested sub-navigation items (same fields)

Example — rendering nav

{% for item in organization.nav_items %}
  <a href="{{ item.url }}"
     class="{% if item.style == 'button' %}btn{% endif %}">
    {{ item.label }}
  </a>
{% endfor %}

Example — membership type grid

{% for type in organization.paid_membership_types %}
  <a href="{{ type.form_url }}">
    {{ type.name }} — {{ type.display_price }}
    {% if type.recurring %} / {{ type.period_description }}{% endif %}
  </a>
{% endfor %}

page PageDrop

The current page. Also available as widget_page inside {% widget %} partials.

Variable Type Description Example
page.id Integer Page ID 42
page.title String Page title Sign our petition
page.slug String URL slug sign-our-petition
page.url String Absolute path to this page /sign-our-petition
page.template_type String Page type (petition, volunteer, contact, etc.) petition
page.published? Boolean Whether the page is publicly visible true
page.content String Rich text content set in the page editor
page.created_at String Creation date (DD MMMM YYYY) 01 January 2025
page.updated_at String Last updated date (DD MMMM YYYY) 15 March 2025
page.meta_title String SEO meta title (falls back to page.title) Stop the development
page.meta_description String SEO meta description Join thousands calling for change.
page.meta_image_url String URL for the meta/OG image
page.og_title String Open Graph title (falls back to meta_title)
page.og_description String Open Graph description (falls back to meta_description)
page.og_image_url String Open Graph image URL
page.twitter_title String Twitter card title (falls back to og_title)
page.twitter_description String Twitter card description
page.twitter_image_url String Twitter card image URL
page.facebook_share_text String Pre-filled text for Facebook share button I just signed — you should too!
page.twitter_share_text String Pre-filled text for Twitter/X share button Sign the petition: {url}
page.email_share_subject String Subject line for email share Please sign this petition
page.email_share_body String Body text for email share I thought you'd want to sign...
page.image_url String Main page image URL. Resolves the media library item keyed "page_image", else a manually entered URL. /rails/active_storage/blobs/...
page.media Array The page's media library — any number of uploaded images/videos. Look up by key (page.media["hero_banner"]) or loop over it. Each item: see fields below.
page.media.images Array Only the image items in the media library.
page.media.videos Array Only the video items in the media library.
page.template_data Hash All page template fields as a hash (same as page.custom_fields). Useful for inspecting or iterating all fields.
page.custom_fields Hash Alias for page.template_data. Returns the full hash — not used for dot-access to individual fields.
page.KEY String Access any template field directly by its key via method_missing — e.g. {{ page.hero_title }}, {{ page.petition_goal }}. This is the correct way to use page template variables. page.petition_title → "Stop the development"

page.media PageMediaDrop

The page's media library — any number of uploaded images/videos. Look one up by key (page.media["hero_banner"]) or loop over the collection; page.media.images and page.media.videos filter by type. Each item exposes:

Variable Type Description Example
.url String Absolute URL to the file /rails/active_storage/blobs/...
.file_name String Original uploaded file name hero.jpg
.content_type String MIME type image/jpeg
.key String Author-assigned key used for lookup hero_banner
.caption String Optional caption Rally in Brisbane
.alt_text String Optional alt text for images Crowd holding signs
.image? Boolean True if the file is an image true
.video? Boolean True if the file is a video false
.width Integer Image width in pixels (images only) 1200
.height Integer Image height in pixels (images only) 630

Example — look up one image by key

<img src="{{ page.media["hero_banner"].url }}" alt="{{ page.media["hero_banner"].alt_text }}">

Example — loop over every image

{% for img in page.media.images %}
  <img src="{{ img.url }}" alt="{{ img.alt_text }}">
{% endfor %}

theme ThemeDrop

The active theme's colour and font settings.

Variable Type Description Example
theme.name String Theme name Standard
theme.primary_color String Primary colour (hex) #1E3A5F
theme.secondary_color String Secondary colour (hex) #2D4A6F
theme.accent_color String Accent colour (hex) #C4956A
theme.heading_font String Heading font family Instrument Sans
theme.body_font String Body font family Source Sans 3
theme.active Boolean Whether this is the active theme true

System Variables

Variable Type Description Example
current_year Integer Current calendar year. Useful for copyright lines. 2025
has_submitted String Set to "true" after the page form is successfully submitted. Use to show a thank-you state. true
organization_logo_html HTML Pre-rendered organisation logo image tag, linked to logo_link_url. Output with {{ organization_logo_html }}. <a href="/"><img src="..." alt="..."></a>

Form & Fields

Use page.form to render forms in your templates. Every page type exposes its own set of fields.

Form structure

Tag / VariableDescription
{{ page.form.open }} Renders the opening <form> tag with CSRF token, page ID, submission type, and honeypot field. Always place at the start of a form.
{{ page.form.close }} Renders the closing </form> tag.
{{ page.form.submit }} Renders the submit button. Button text comes from the page's submit_button_text template variable.

Field methods

Replace FIELD with a field name from the table below (e.g. page.form.email.input).

VariableDescription
page.form.FIELD.label Renders the <label> element for this field.
page.form.FIELD.input Renders the appropriate input element (input, textarea, select, or checkbox) for this field. Apply form filters to customise.
page.form.FIELD.name The field's input name attribute value.
page.form.FIELD.type The field type (text, email, tel, textarea, select, checkbox, checkbox_group, date).
page.form.FIELD.required Boolean — whether this field is required.

Available fields by page type

Page TypeAvailable Fields
contact enquiry_type first_name last_name email phone message
petition first_name last_name email city display_name
volunteer first_name last_name email mobile date_of_birth
signup first_name last_name email phone interests
home email
donation first_name last_name email phone amount address_line1 suburb state postcode
membership first_name last_name email phone membership_type address_line1 suburb state postcode

Special form tags

Use these inside {{ page.form.open }}{{ page.form.close }} for complex input types.

TagDescription
{% form_address %} Renders a full Australian address block (suburb, postcode, state) with AddressFinder autocomplete. Params: prefix: "residential" or "mailing", required: true/false, manual_entry: true/false, fields: postcode (postcode-only).
{% form_interests %} Renders a checkbox grid of volunteer/interest options from the page's template data. Params: name: "volunteer_interests", columns: 2.
{% issues_form %} Renders an issues/preferences checkbox grid (suitable for contact pages). Params: columns: 2.

Example — petition form

{{ page.form.open }}
  <div class="grid grid-cols-2 gap-4">
    <div>
      {{ page.form.first_name.label }}
      {{ page.form.first_name.input | add_class: "w-full border rounded px-3 py-2" | placeholder: "First name" }}
    </div>
    <div>
      {{ page.form.last_name.label }}
      {{ page.form.last_name.input | add_class: "w-full border rounded px-3 py-2" }}
    </div>
  </div>
  {{ page.form.email.label }}
  {{ page.form.email.input | add_class: "w-full border rounded px-3 py-2" | placeholder: "you@example.com" }}
  {% form_address %}
  {{ page.form.submit }}
{{ page.form.close }}

Page-Type Variables

These fields are set in the page editor. Access them as {{ page.KEY }} — e.g. {{ page.petition_title }}. page.custom_fields returns the full template data hash if you need to inspect it, but individual fields use direct dot-access.

Home pages home

VariableLabelTypeNotes
page.hero_title Hero Title String
page.hero_subtitle Hero Subtitle String
page.hero_button_text Hero Button Text String
page.about_section About Section HTML
page.email_placeholder Email Placeholder String
page.signup_button_text Signup Button Text String

Petition pages petition

VariableLabelTypeNotes
page.petition_title Petition Title String
page.petition_description Petition Description String
page.image_url Page Image URL String Main page image — media library "page_image" item, or a manually entered URL
page.main_content Main Content HTML The issue details / body copy
page.initial_signatures Initial Signatures Integer Starting count added to online signatures
page.petition_goal Petition Goal Integer Target number for page.signatures_percentage
page.submit_button_text Submit Button Text String
page.social_proof_enabled Social Proof Enabled String Set to "1" to show social proof notifications

Volunteer pages volunteer

VariableLabelTypeNotes
page.page_title Page Title String
page.hero_text Hero Text String
page.main_content Main Content HTML
page.intro_text Intro Text HTML Fallback if main_content is not set
page.form_title Form Title String
page.submit_button_text Submit Button Text String
page.thank_you_message Thank You Message String

Contact pages contact

VariableLabelTypeNotes
page.page_title Page Title String
page.intro_text Intro Text HTML
page.office_address Office Address String
page.phone_number Phone Number String
page.email_address Email Address String
page.enquiry_types Enquiry Types String Comma-separated list, e.g. "General,Media,Volunteering"
page.thank_you_message Thank You Message String
page.consent_text Consent Text String
page.submit_button_text Submit Button Text String

Signup pages signup

VariableLabelTypeNotes
page.page_title Page Title String
page.main_content Main Content HTML
page.form_title Form Title String
page.form_intro Form Introduction HTML
page.submit_button_text Submit Button Text String
page.social_proof_enabled Social Proof String Set to "1" to enable

Membership pages membership

VariableLabelTypeNotes
page.page_title Page Title String
page.hero_text Hero Text String
page.main_content Main Content HTML
page.benefits_title Benefits Title String
page.benefits_content Benefits Content HTML
page.submit_button_text Submit Button Text String
page.social_proof_enabled Social Proof String Set to "1" to enable

Donation pages donation

VariableLabelTypeNotes
page.page_title Page Title String
page.hero_text Hero Text String
page.main_content Main Content HTML
page.secure_text Secure Payment Text String
page.donation_amounts Donation Amounts String Comma-separated, e.g. "25,50,100,250"
page.default_amount Default Amount String
page.submit_button_text Submit Button Text String
page.processing_text Processing Text String
page.social_proof_enabled Social Proof String Set to "1" to enable

Post index pages post_index

VariableLabelTypeNotes
page.intro_text Intro Text HTML Lead paragraph under the feed title
page.eyebrow Eyebrow String Small label above the title (defaults to "Latest updates")

Post pages post

VariableLabelTypeNotes
page.body Body HTML The article body (rich text)
page.excerpt Excerpt String Short summary shown on the feed index cards
page.author Author String Byline shown on the article and cards

Social Proof Variables

Page-level counters and recent-activity lists. Also available as widget_page.signatures etc. inside {% widget %} partials.

Variable Type Description Example
page.submission_count Integer Total form submissions on this page (all types: petition, volunteer, signup, contact) 1247
page.signatures Integer Petition: total signatures (online actions + initial_signatures template variable) 842
page.signatures_percentage Integer Petition: percentage of petition_goal reached (0–100, capped at 100) 68
page.recent_signers Array Petition: up to 10 most recent signers. Each item: name, first_name, suburb, time_ago, signed_at.
page.recent_volunteers Array Volunteer: up to 10 most recent volunteer signups. Each item: name, first_name, suburb, time_ago, signed_up_at.
page.total_raised Float Donation: total amount raised via this specific page ($) 12480.0
page.donor_count Integer Donation: number of unique donors via this page 94

recent_signers fields

Variable Type Description Example
.name String Full display name Jane S.
.first_name String First name only Jane
.suburb String Suburb Toowong
.time_ago String Human-readable relative time 3 minutes ago
.signed_at String Formatted date (DD Mon YYYY) 15 Mar 2025

recent_volunteers fields

Variable Type Description Example
.name String Full display name James T.
.first_name String First name only James
.suburb String Suburb Fortitude Valley
.time_ago String Human-readable relative time 2 hours ago
.signed_up_at String Formatted date (DD Mon YYYY) 20 Mar 2025

Example — petition progress bar

{% assign pct = page.signatures_percentage %}
<div class="progress-bar" style="width: {{ pct }}%"></div>
<p>{{ page.signatures }} of {{ page.custom_fields.petition_goal }} signatures</p>

Example — recent signers list

{% for signer in page.recent_signers limit: 5 %}
  <p>{{ signer.first_name }} from {{ signer.suburb }} signed {{ signer.time_ago }} ago</p>
{% endfor %}

Posts & Feeds

A feed is a post_index page (e.g. "News" or "Media Releases"); a post is an article within it. On a feed template, page.posts is the paginated list of published posts. On an article template, the article fields are on page.*.

Variable Type Description Example
page.posts Array Feed (post_index) only: the feed's published posts for the current page, newest first. Loop with {% for post in page.posts %}. Each item: see fields below.
page.posts.total_count Integer Total published posts across all pages of this feed. 23
page.posts.first Post The most recent post (useful for a lead/feature card).
page.posts.pagination Object Pagination state for building a pager. Fields below.
page.hero_image_url String Post (article) page: URL of the featured image (hero_image attachment). /rails/active_storage/blobs/...
page.published_at String Post (article) page: editorial publish date (D Month YYYY). 11 June 2026
page.body HTML Post (article) page: the rich-text article body. <p>…</p>
page.author String Post (article) page: byline/author. Press Office
page.excerpt String Post (article) page: short summary shown on feed cards. A short summary.

post fields (inside {% for post in page.posts %})

Variable Type Description Example
.title String Post title Budget leaves regions behind
.url String Flat-slug path to the article /budget-response
.excerpt String Short summary for the card A short summary.
.author String Byline / author Press Office
.published_at String Editorial date (D Month YYYY) 11 June 2026
.featured_image String Featured image URL (hero_image; may be blank) /rails/active_storage/blobs/...
.body HTML Full article body <p>…</p>

page.posts.pagination fields

Variable Type Description Example
.current_page Integer Current page number (from ?page=N) 1
.total_pages Integer Total number of pages 3
.total_count Integer Total published posts in the feed 23
.previous_url String URL of the previous page (blank on page 1) /news
.next_url String URL of the next page (blank on last page) /news?page=2
.pages Array Numbered entries for a custom pager. Each: number, url, current.

Example — feed index with cards and pager

{% for post in page.posts %}
  <a href="{{ post.url }}">
    <img src="{{ post.featured_image }}">
    <h3>{{ post.title }}</h3>
    <p>{{ post.excerpt }}</p>
    <span>{{ post.published_at }} · {{ post.author }}</span>
  </a>
{% endfor %}

{% assign pg = page.posts.pagination %}
{% if pg.total_pages > 1 %}
  {% for p in pg.pages %}
    <a href="{{ p.url }}">{{ p.number }}</a>
  {% endfor %}
{% endif %}

Custom Fields

Custom fields let you attach additional editable content to any page. They're configured in the dashboard at Dashboard → Settings → Custom Fields and their values are stored alongside built-in template variables in page.template_data.

Accessing custom fields: Custom field values are accessed the same way as built-in template variables — directly as {{ page.your_field_key }}. The field key is set when you create the field in the dashboard (lowercase letters, numbers, and underscores).

Field types

TypeDescriptionExample usage
text Single-line text input {{ page.campaign_slogan }}
textarea Multi-line plain text {{ page.intro_paragraph }}
rich_text HTML rich text (output with {{ var }} — Liquid renders it as HTML) {{ page.about_section }}
image An image chosen from the page's media library or an external URL — outputs a URL string either way {{ page.hero_image_url }}
url URL string {{ page.cta_link }}
number Numeric value {{ page.target_amount }}
select One value from a predefined list of options {{ page.layout_style }}
boolean True or false (stored as "1"/"" — check with {% if page.show_banner == '1' %}) {% if page.show_banner == '1' %}…{% endif %}
repeater Repeating group of sub-fields — value is an array of hashes. Iterate with {% for %}. {% for item in page.team_members %}{{ item.name }}{% endfor %}

Scoping

Field groups can be scoped to control which pages they appear on. More specific rules take priority.

ScopeWhere it applies
Specific page Only one named page — highest priority
Content template All pages using a particular content template
Page type All pages of a given type (petition, volunteer, etc.)
All pages Every page in the organisation — lowest priority

Example — text, rich_text, boolean

{{ page.campaign_slogan }}

{{ page.about_section }}

{% if page.show_banner == '1' %}
  <div class="banner">{{ page.banner_text }}</div>
{% endif %}

Example — repeater field

{% for member in page.team_members %}
  <div class="team-card">
    <img src="{{ member.photo }}" alt="{{ member.name }}">
    <h3>{{ member.name }}</h3>
    <p>{{ member.role }}</p>
  </div>
{% endfor %}

Complex Components

Tags render complex components — forms, payment elements, sharing, and page embeds. Parameters shown in italics are optional.

snippet {% snippet 'key' %}

Inserts a reusable HTML snippet from the Theme Editor. The key is the snippet's template_key.

'key' — Quoted template key of the snippet to render
{% snippet 'footer_cta' %}
widget {% widget 'slug' with 'partial_name' %}

Embeds another published page's form inline. The slug can be a quoted string or a Liquid variable path. The partial_name refers to a widget_partial or snippet in the Theme Editor. Inside the partial, use widget_page for the embedded page's data.

'slug' — Page slug — quoted string or variable path (e.g. page.custom_fields.donation_slug) 'partial_name' — Name of the widget partial or snippet to render
{% widget 'donate-now' with 'donation_widget' %}
hero_image {% hero_image %}

Renders a hero section background using the page's attached image. Falls back to a gradient if no image is attached. Params: fallback_gradient (CSS gradient string), overlay_class (Tailwind class for image overlay).

fallback_gradient — CSS gradient for when no image is attached. Default: navy gradient. overlay_class — Tailwind class for the dark overlay. Default: bg-black/30
{% hero_image fallback_gradient: 'linear-gradient(135deg, #1E3A5F, #2D6A4F)' overlay_class: 'bg-black/40' %}
video_player {% video_player %} or {% video_player "key" %}

Renders a Plyr video player for one of the page's media-library videos. With no argument it uses the item keyed "video", else the first uploaded video. Pass a key to play a specific video (useful when a page has several). Renders nothing if no matching video exists.

key — Optional media key of the video to play. Bare quoted ("intro") or key: "intro". Defaults to the "video" item or first video.
{% video_player "intro" %}
share_buttons {% share_buttons %}

Renders Twitter/X, Facebook, and email share buttons using the page's share text fields. Params: layout (vertical or horizontal), text (introductory label above buttons).

layout — "vertical" (default) or "horizontal" text — Label above the share buttons
{% share_buttons layout: 'horizontal' text: 'Spread the word:' %}
form_address {% form_address %}

Renders a full Australian address block (suburb, postcode, state) with AddressFinder autocomplete and a manual entry fallback. Use inside {{ page.form.open }} … {{ page.form.close }}.

prefix — "residential" (default) or "mailing" required — true (default) or false manual_entry — true or false — show manual entry link fields — Omit for the full address block, or "postcode" for a postcode-only field
{% form_address prefix: 'residential' required: true %}
form_interests {% form_interests %}

Renders a checkbox grid of interest/volunteer options read from the page's template data. Use inside {{ page.form.open }} … {{ page.form.close }}.

name — Field name. Default: "volunteer_interests" columns — Grid columns. Default: 2
{% form_interests name: 'volunteer_interests' columns: 2 %}
issues_form {% issues_form %}

Renders an issues/preferences checkbox grid (for contact pages) with a submit button.

columns — Grid columns. Default: 2
{% issues_form columns: 3 %}
petition_signatures {% petition_signatures %}

Renders a styled signature count block (online signatures + initial_signatures template variable). Includes a progress bar if petition_goal is set.

{% petition_signatures %}
recent_signers {% recent_signers %}

Renders a row of up to 5 recent petition signer badges (name + suburb). For full control, iterate page.recent_signers directly.

{% recent_signers %}
recent_donations_stats {% recent_donations_stats %}

Renders a stats card showing total donors and average donation amount for the organisation. Add per-page baseline numbers via the donation page's Initial Unique Contributors / Initial Average Amount settings — they are added on top of live donations.

{% recent_donations_stats %}
membership_type_cards {% membership_type_cards %}

Renders the membership tier selection UI with toggle between recurring and one-time plans. Reads from organization.paid_membership_types.

{% membership_type_cards %}
donation_three_step_form {% donation_three_step_form %}

Renders Step 1 of the three-step donation flow (amount and frequency selection). Also injects the required Stripe.js script tag.

{% donation_three_step_form %}
stripe_amount_selector {% stripe_amount_selector %}

Renders donation amount buttons with a custom amount option. Use inside a Stripe-enabled donation form.

{% stripe_amount_selector %}
stripe_card_element {% stripe_card_element %}

Renders the Stripe.js card input container. Params: id (element ID), error_id (error container ID).

id — ID of the card element div. Default: "card-element" error_id — ID of the error display div. Default: "card-errors"
{% stripe_card_element id: 'card-element' error_id: 'card-errors' %}
quick_links {% quick_links %}

Renders a grid of up to 6 published pages as linked cards. Pages are ordered by their position in the dashboard.

{% quick_links %}
find_page {% find_page slug: 'page-slug' %}

Looks up a published page by slug and sets a context variable found_page_SLUG to the page URL. Returns nil if not found. Useful for building dynamic links.

slug — Quoted page slug to look up
{% find_page slug: 'donate' %}
<a href="{{ found_page_donate }}">Donate</a>
cobber_credit {% cobber_credit %}

Renders a small "Powered by Cobber" attribution link. Typically placed in the footer.

{% cobber_credit %}

Form Filters

Pipe a rendered field through these filters to customise HTML attributes inline. Multiple filters can be chained: {{ page.form.email.input | add_class: "..." | placeholder: "..." | required }}

FilterSyntaxDescriptionExample
add_class | add_class: "classes" Merges one or more CSS classes into the element's class attribute. {{ page.form.email.input | add_class: "border rounded px-3 py-2" }}
placeholder | placeholder: "text" Sets the placeholder attribute on an input. {{ page.form.email.input | placeholder: "you@example.com" }}
attr | attr: "name", "value" Adds any attribute to the element. {{ page.form.email.input | attr: "data-controller", "form-field" }}
data | data: "name", "value" Adds a data-NAME attribute to the element (shorthand for attr with data- prefix). {{ page.form.email.input | data: "required-message", "Email is required" }}
id | id: "value" Sets the id attribute. {{ page.form.email.input | id: "email-field" }}
name | name: "value" Overrides the name attribute. {{ page.form.email.input | name: "custom_email" }}
value | value: "value" Sets the value attribute. {{ page.form.first_name.input | value: "" }}
required | required Adds the required attribute. {{ page.form.phone.input | required }}
disabled | disabled Adds the disabled attribute. {{ page.form.email.input | disabled }}
rows | rows: N Sets the rows attribute (textarea only). {{ page.form.message.input | rows: 6 }}
autocomplete | autocomplete: "value" Sets the autocomplete attribute (e.g. on, off, email, given-name). {{ page.form.email.input | autocomplete: "email" }}

Standard Liquid

Cobber uses Liquid 5 — all standard tags and filters work. Below is a quick reference; see the Liquid docs for full detail.

Tags

TagDescriptionExample
if / elsif / else / endif Conditional blocks {% if page.title == 'Home' %}…{% endif %}
unless / endunless Inverse conditional (runs if NOT true) {% unless has_submitted == 'true' %}…{% endunless %}
case / when Multi-branch conditional {% case page.template_type %}{% when 'petition' %}…{% endcase %}
for / endfor Loop over an array. Supports limit:, offset:, reversed. {% for signer in page.recent_signers limit: 5 %}…{% endfor %}
assign Create or overwrite a variable {% assign goal = page.custom_fields.petition_goal | plus: 0 %}
capture / endcapture Capture rendered output into a variable {% capture share_url %}https://example.com/{{ page.slug }}{% endcapture %}
comment / endcomment Hidden notes — not rendered to the page {% comment %}TODO: update hero{% endcomment %}
raw / endraw Prevent Liquid from parsing enclosed content {% raw %}{{ this will not be parsed }}{% endraw %}
cycle Alternate values across loop iterations {% cycle 'odd', 'even' %}
break / continue Exit or skip to next iteration in a for loop {% if signer.suburb == '' %}{% continue %}{% endif %}

Filters

FilterDescriptionExample
upcase / downcase Change string case {{ organization.name | upcase }}
capitalize Capitalise first letter {{ page.slug | capitalize }}
truncate: N Truncate string to N characters {{ page.meta_description | truncate: 120 }}
truncatewords: N Truncate to N words {{ page.content | truncatewords: 30 }}
strip_html Remove all HTML tags {{ page.content | strip_html }}
replace: 'a', 'b' Replace all occurrences of a with b {{ page.title | replace: 'QLD', 'Queensland' }}
prepend / append Add text to start or end of a string {{ page.slug | prepend: '/' }}
split: 'delimiter' Split string into array {{ page.custom_fields.donation_amounts | split: ',' }}
join: 'separator' Join array elements into a string {{ tags | join: ', ' }}
size Length of string or array {{ page.recent_signers | size }}
first / last First or last element of an array {{ page.recent_signers | first }}
map: 'field' Extract a field from each array item {{ page.recent_signers | map: 'suburb' | join: ', ' }}
uniq Remove duplicate values from an array {{ suburbs | uniq }}
sort Sort an array {{ tags | sort }}
plus / minus / times / divided_by / modulo Arithmetic {{ page.signatures | divided_by: page.custom_fields.petition_goal | times: 100 }}
round / ceil / floor Round a number {{ organization.total_raised | round: 2 }}
date: 'format' Format a date string using strftime syntax {{ page.created_at | date: '%d/%m/%Y' }}
default: 'value' Fall back to a value if variable is nil/empty/false {{ page.meta_title | default: page.title }}
url_encode URL-encode a string (for query parameters) {{ page.url | url_encode }}
escape HTML-escape a string {{ page.title | escape }}

Email Template Variables

These variables are available in email campaign templates in addition to organization and current_year. They are not available in public page templates.

Person, Membership & Payment

Variable Type Description
person.first_name String Recipient's first name
person.last_name String Recipient's last name
person.display_name String Recipient's display name
person.email String Recipient's email address
person.phone String Recipient's phone (mobile, home, or work)
person.suburb String Recipient's suburb
person.state String Recipient's state
person.federal_electorate String Recipient's federal electorate
person.state_electorate String Recipient's state electorate
person.volunteer_status String Volunteer status
person.volunteer? Boolean True if person is a volunteer
person.membership_status String Membership status (active, expired, etc.)
person.has_active_membership? Boolean True if person has an active membership
membership.number String Membership number
membership.status String Status (active, expired, pending, cancelled)
membership.type_name String Membership tier name
membership.type_price String Formatted price (e.g. $50/year)
membership.started_at String Start date (DD Month YYYY)
membership.expires_at String Expiry date (DD Month YYYY)
membership.days_until_expiry Integer Days until expiry
membership.display_name String Full membership display name (includes secondary person if couple)
payment.amount String Formatted payment amount (e.g. $50.00)
payment.amount_raw Decimal Raw numeric amount
payment.status String Payment status
payment.payment_type String Type of payment (donation, membership_fee, etc.)
payment.processed_at String Date payment was processed (DD Month YYYY)
payment.receipt_url String URL to the Stripe receipt